When we first visited USJ we did it as a day trip from Kyoto. It was a very long day with an early start, but it meant we didn’t have to move to another hotel.
Travel time from Kyoto Station to Universal City Station is about 45-55 minutes and you have to use 3 or 4 trains to get there.
If you have a Japan Rail Pass you will be able to use your JR Pass for all parts of the trip. Note that not all trains between Kyoto and Osaka are included in the Japan Rail Pass, so check before booking.