Of course, it can be done badly. I recall with shudders of distaste the tacky use of the Bangles' "Walk Like an Egyptian" in the entrance of the King Tut exhibit at LACMA in 2005. More recently, the Metropolitan Museum of Art showed its ignorance when it misinterpreted the Canadian band The Guess Who's vitriolic "American Woman" as a paean to American female pulchritude in its "American Woman" show; I doubt that this was a subtle use of anti-establishment irony, and more a case of the curator not having listened to the lyrics.
Still, I loved the use of Jazz Age music throughout the V&A's Art Deco show, and the compilation "soundtrack" is still one of my favourites to listen to. In fact, I have quite the collection of 1920s/30s music thanks to a string of Deco-related exhibitions held around that time. I also have French museums to thank for my many compilations of early/medieval/Renaissance music, which have introduced me to new genres, composers, and artists, not to mention providing me with a rather wonderful ambient soundscape.
So, as a tip to my fellow museum music lovers out there, I bring you a link I have just discovered: MuseumMusic, which appears to be the distributor for CDs commissioned by New York museums. I have the fashion one, of course, but if anyone wants to get me "Music to Spy By," I will squeal with glee. Just throwing it out there... Christmas is only a few months away!