Manchester. DEFINITELY Manchester. Although true that Manchester may have more crime in areas than Nottingham, having had a lot of nights out in both Manchester and Nottingham, I've seen WAY less trouble in Manchester. I assume because it is more spread out it is easier to get areas where similar people hang out, whereas in Nottingham everyone is kind of piled on top of each other! Nottingham has shops, don't get me wrong, but it's not got anywhere near the level Manchester does. Also Manchester is much more accessible, It might not seem it but Nottingham is a bit of a b**** to get to on the train, which tens to be the main way to get around for students.
I don't really know a lot about Leicester, but my sister lives there and doesn't speak particularly highly of it, so she is currently trying to move to..............Manchester coincidentally.
Although obviously I have no idea about your course. To be honest, a city is only part of the uni experience and students can have a great time in places like St. Andrews. So I probably wouldn't dwell on it too much. If the course is right I'm sure any of those cities would be fun enough.