St Andrews is a very good- even excellent- university. It's in a nice town that people either find appealing or not, has some famous alumni, a proud history, mostly very capable students and some terrific staff.
That all being said, it's fairly clear to anyone with a longer-run view of things (and by that I just mean 20 years of the last 600), that it's undergone a reputational transformation among young people and those without much knowledge of the university sector. It has done this because of media coverage in the last decade or so that's equated a prince with the best of the best of education (but still getting Bs and Cs from Eton, which doesn't happen very often) and a socially elite standing, going to a place that would let him in and be far away from the paparazzi, with prestige (as loose a concept as that is). As an added bonus, it's always been a quaint, well-off, place, and wouldn't exactly drop him in the middle of Toxteth if he went out for a wander. Because it doesn't exactly serve the BBC well to suggest what I have just suggested, it's been ingrained recently that it's 'just like' Oxford and Cambridge. Also, the way league tables are compiled means that it has some natural advantages in its student demographic: well off students are unlikely to drop out, fail to get at least a 2:1, be miserable or fail to get a job. Couple that with the growing publicity and demand for places, and you have the recipe of a high ranking. Remember though that things can change (anyone remember York being second in 1998 and not often out of the top 5 between about 1995 and 2002?), and you'll be using that degree for a long time. In the 1960s, St Andrews was considering closing and moving to Dundee, and in the 1990s it couldn't fill its courses.
I'd have to agree that to me and others in my position, it has never been the head-turning, 'you must be so clever', place that some on here think it is (you're not going to get unbiased answers in a forum made up mainly of St Andrews students). Unfairly or not, there has been the insinuation that St Andrews (but not just St Andrews) has a higher proportion of students with good grades on paper, but nevertheless from the bottom of excellent schools where they'd be expected to have even better grades, than other institutions with a more mixed demographic. I'd say for research and scholarship, I'd still consider at best on par or it behind some of the larger, multifaculty universities in the UK- like Edinburgh, Glasgow, Manchester, UCL. As an doctoral researcher and interested in things of that ilk (like libraries, archives, labs), it's probably unsurprising I think that way. If the OP is genuine, and he's not necessarily interested in research, PhDs, then the IR department is one of the better ones outside of the USA, and it'd be a good choice for an MSc. Just don't go thinking it's like Harvard.