Cardiff is a pretty safe city and the main student areas (Cathays, Roath, Penylan) aren't plagued by the chav menace that some other cities are. The areas which have a deservedly bad reputation for crime and disorder are:
Ely - way out in the west of the city, no student ever need go there
Gabalfa/Mynachdy - near to Talybont, students still don't go there
Butetown - crime-ridden urban area between town and The Bay - the buses and trains will drop you safely at either end
Llanederyn - rhymes with Kick Yer Head In - miles from any students
St Mellons - yet another white trash council estate, students rarely spotted
Splott, Canton, Adamsdown, Riverside, Grangetown and Llandaff North have both good and bad areas - the discerning eye will be able to tell between.
You should feel completely safe going to Llandaff, Fairwater, St Fagans, Whitchurch, Pantmawr, Heath, Rhiwbina, Pontprennau, Llanishen, Lisvane, Birchgrove, Tongwynlais, Cyncoed and Rumney (although not Llanrumney).
The city centre pubs and bars are nice and unthreatening, although some (like Jumpin' Jaks on Naked Tuesdays) may get a fluctuating reputation for scumminess. Don't go to the Maindy or Master Gunner near Talybont, the Blackweir is cheaper and safer.