The uni has a number of colleges, with Graduate College being one of them. It offers accommodation on campus just for graduate students, and is situated on the south-west part of campus (Alexandra Park). It's a little bit of an extra walk away from the main bit of campus (only like an extra 10 mins or so), but that also means it's a pretty peaceful part of campus rather than being disrupted by undergrads in the other colleges.
You can apply for accommodation on campus via the university, and you'll get placed in a flat with fellow grad students. Otherwise, you can search for a house in town (there are a variety of students blocks, such as CityBlock and Damside, or there are people with spare rooms in their student houses that they're looking to fill). The advantage of town is it's a separate space from uni, so it's nice separating study from down-time, and it's cheaper than campus accommodation.
At the end of the day, it depends on whether you'd prefer to live on campus so you had easier access to facilities and the ability to spend late nights in the library working without worrying about catching a bus back home to town. Campus has lots of facilities for food and drink, so it's pretty self-contained and you wouldn't really need to leave campus if you didn't want.