My own take on both cities is this: Edinburgh is a terrific place to visit, it has some great things to see, a terrific Christmas market and the Fringe is wonderful. Glasgow is a better place to live, has more pubs, clubs, shops, students, live music, transport links and parks than any city in the UK & Ireland outside of London. In that respect, more things to do beyond what tourists typically want to do in 3-4 days. For theatre, music and sport, it's the better city: National Theatre of Scotland, Royal Ballet, BBC Scotland, National Football Stadium, the two busiest museums and the Royal Conservatoire are all in the West, whilst the reputation for stand up Comedy, the National Gallery and the National Library are in the East.
It should however be said that while Edinburgh has the National Library, Glasgow has Europe's largest public reference library (the Mitchell), while Glasgow has some great theatres, so does Edinburgh, and while Glasgow has the two busiest museums, Edinburgh has the next two, and the number one tourist attraction in the country, and so on. In other words, they're two of the best cities in the UK, and don't let TSR's south-of-England bias tell you otherwise. What you'll tend to hear about Glasgow is lots of bad things that come from parents and teachers that probably haven't been to the city in decades, if at all, and tell you the tired stereotypes. Glasgow in 2012 is lightyears away from Glasgow in 1972. To most who haven't been in a while and those old enough to remember even the 80s, it's unrecognisable from the post-industrial factory-dominated city of 40 years ago. Stereotypes from 500 miles away take a long, long time to go away though.
Safety wise, both have areas you really shouldn't go at night, and there are more of these in Glasgow as the remnants of the unemployment caused by the closure of factories still exist, but they're pretty far away from the university. Safety in the areas around the campuses/city centres are identical. The West End of Glasgow and the Old Town in Edinburgh are two of the nicest places to be in the UK.
University wise, nothing to pick: again, the stereotype of Glasgow (the city) has undoubtedly meant the further in the UK you go from it, the more bad things people are likely to believe about it, and as such while Glasgow is the most popular university to apply to for Scots, it's well behind Edinburgh and St Andrews for applications from England. In terms of European and the rest of the world applicants, there isn't any difference. Both are marginally ahead or behind the other depending on what you think is important. Sometimes Edinburgh's department has more strengths than Glasgow's, sometimes it's the other way around. Student satisfaction is higher at one, completion rate is higher at the other: go figure. If you tweak which things you think are important, one of them could be a stand out, or it could be the other. In short, personal preference is key, but they're both among the best universities in Europe, so you're not going to lose out, even if some 17 year old kid on TSR tells you otherwise.