to be honest, i wouldn't really move to SJH til clinical years. There have been improvements, but it's still not the safest place (Kilmainham, islandbridge) and if you're out in town it wouldn't be advisable to walk home, you'd have to taxi every time.
Near Trinity, there's Christchurch but stay on the side of Christchurch that's actually right besides Christchurch, Ranelagh, Ballsbridge (more expensive but if you share with others it's alright), some have apartments just off Grafton St. or Dame St. There are some apt's in Temple bar too that are nice if you share, but they can be very loud at weekends and holidays. Smithfield has also gotten nice, and places near Jervis centre.
You're not really completely safe from mugging anywhere in Dublin, but just play smart and you'll be fine. It might cost a bit more but it can be affordable if you do some searching. It's easiest to pick somewhere that you can walk home to quickly after a night out.