I coudn't agree more with Conisue and ZME. I have been to both a few times. Both can be party towns, but Madrid much more, and there is so much more to see. Many sites with international reputations. You can get very good hotel deals by looking around on the web. And most restaurants have a "menu del dia" which gives you a choice of about three or four entress and everything else including wine for a very, very reasonable price.
Madrid is one of my absolute favorite cities in the whole world. Buenos Aires is also fun, but spread out, extremely late, only on weekends, and a bit on the nose in the air crowd. And while the city is very interesting and the food is excellent, there are just not a lot of sites - or even many places to go from there.
Just one word of caution. Do not go to Madrid in the summer (late June to the end of August). It can get and stay very hot. Anytime from September to the beginning of June is fine.
Actually another word of caution. Neither city is big with the hard leather scene like Berlin or Amsterdam, if that is what you like. Madrid has much more of it in the Eagle and "El-Darko" and Copper than BA.