I had a rubbish time at uni the first time I went. I did Law at Cardiff. I didn't get on with people particularly (found them a bit boring, annoying), found life too centred around getting drunk, found that my halls weren't that easy to be sociable in, and was bored by my course.
I dropped out, reapplied, went to do Politics, Philosophy and Economics at York. There I made loads of friends, found my halls very sociable, really enjoyed my course, found loads of interesting people to spend time with, did loads of extra-currics, etc.
I reckon a big chunk of it is down to luck. For me, a smaller uni with a stronger sense of community suited me, as did a uni environment slightly less focused on getting smashed. But I'm sure you can make a great time out of other types of environments, if those suit you better.
It's just trying to work out what kind of experience suits you - which isn't easy. Good luck!