My eldest went to St Andrews, and her sister is at Edinburgh now. They are both great choices. St Andrews has an excellent reputation for IR, and Edinburgh is very strong for Politics. Both very good for Economics. I presume that you have visited both, living in Scotland for their open days? I think that suit very different types of students.
St Andrews is a small town with a beautiful beach and although student numbers have risen considerably it has an almost village feel. For clothes shopping there's an H&M and more mumsy shops like White Stuff, Fatface and Seasalt as well as some good charity shops. Eating out is (in our opinion) a bit disappointing as it's expensive or average. The main focus of parties is through clubs and the union, and lots of students aren't the going out type. Pres can be the best bit! There are some great sports clubs (my daughter made great friends there who she still sees) and accomodation past 1st year is quite tricky and expensive, even more so due to the demand than Ednburgh. However, my eldest LOVED it, and turned down a place at Cambridge to go. Pastoral care is excellent.
Edinburgh obviously has a lot more going for it and has some fantastic features like the library - open 24/7 and really popular! It's a warm place for those whose flats are cold, it's a meeting place for friends, a great place to study and because to many are within walking distance it's like a social hub. There are lots of departmental libraries as week. My daughter uses the law library and the Philosophy library too. She's been really well supported there, and has made some good friends. Eating out is much more varied and cheaper, though going out to clubs is disappointing compared to London, as the are the art exhibitions. Accomodation is expensive, but not as much or a difficult to find, and they also have flats on Domus for returning students which are good value but go quickly.
My eldest loved St Andrews as it suited her, her sister would have hated to be there, though liked to visit and still does.