It depends on you, your course and what your home situation's like.
I decided to live on campus for my first year (last year) but realised quite quickly that as a mature 22 year old I had little in common with my 18 year old flat mates, and no desire to become best mates with them. I preferred to study in my room to in the library although it was nice to be a short walk away for getting books out. Also it was nice to have my own space and not have to travel to get to lectures.
This year I am commuting (an hour and a half to two hours on the bus) Because:
-I miss my boyfriend too much. I was travelling home at least every weekend to see him and it doesn't make sense for us both to pay rent and bills on separate places when half the time I wasn't even at my place. (commuting for the term costs me less than 2 weeks rent).
-I made friends on my course but most of them commute so I couldn't move in with them in the second year. One of the best friends I've made lives in my home town so we can get the bus together. I think commuting will motivate me to do more study- as in between lectures last year I would go back to my room and waste time, this year I hope to study, and also we can use half the time on the bus to study, the other half to read.
-I'm able to commit to part time work where as before I was spending my weekends traveling home to see people, these people I will now be able to see during the week.
-I don't like sharing a kitchen with other people. If my boyfriend makes a disgusting mess I can tell him to clean it up NOW, it's not the same with flat mates!!! Also having your whole life in one room does drive me a bit crazy, like I like to study and watch tv etc is a separate room to where I sleep..