It's quite easy to balance the two, however you need to have priorities.
Throughout this year I barely went out during the weekday as I would use the time to study around 3 hours a night, and the rest of the time I would spend on the computer or watching television. Friday nights I would usually go out, or if I didn't go out I would study because that's how bored I would get. Saturday's were always homework free days. They were my relax days.
All up I think I balanced it nicely, and even during exam time I haven't locked myself up and isolated myself from society. Seen 2 movies and hang out with a couple of mates all within the last week.
Doing well all depends on how much you want to, and if you're willing to put in the effort, but also allow yourself time to relax