I like to write in busy places - at a coffee shop, in a restaurant, at a mall. I find that the ambience is relaxing (likely due to my many years waiting tables). The noise of ambient conversation can sometimes be enough to keep my mind on writing, while providing the necessary distraction that will help me take a break once in a while. It is also good to note that I am much more likely to not waste my time while I am out in public, as I'm sure everyone can see if I'm on Facebook or playing some game.
Sometimes the ambience is too much - or not enough. The most common music I select for writing is meditative in nature. This is an example of a very good group called Dead Can Dance.
Likewise, one of my favorite albums is excellent for writing (except when it gets really good and I just have to "conduct" like an idiot in front of a bunch of onlookers). Gladiator is also one of my favorite movies (and subjects to study). If you think the singer sounds familiar, you are right. Lisa Gerrard is the vocalist for both Dead Can Dance and the Gladiator soundtrack.
Another favorite composer of mine is Karl Jenkins. If you like these two selections, you will love his work under the name of Adiemus. I am sure you will sense some similarities.
The nice thing about these selections is that the words are not real. They are, for the most part, a made-up language (though some DCD songs are in English). I find that if I am in a meditative mood, lyrics are not good. But sometimes this style is not what I am in the mood for. In that case, I will go for instrumental guitar, classical guitar*, or just plain classical.
(*yes, that is a 10-string guitar. At some point, I expect some talented youtube artist or comedian will mock this trend of many-stringed guitars and finally make a video of someone playing a 100-string guitar. It will be epic.)
All-too-often, however, meditation is not what I am after. My mind is excited, busy, loud. I need excited and loud to keep it in check. This is when I personally turn to progressive rock, progressive metal, and other similar styles.
If I am not in the mood for words, or at least not many, then I tend to listen to Ozric Tentacles. This band is on the line between meditation and the heavier stuff, as you can hear for yourself.
A similar group that leads closer to the heavier things is Porcupine Tree. This is their more meditative album, though I warm you, the subject matter is not exactly kid-friendly. But I have written quite often to it. For their more mainstream and less meditative fare, click the link here.
Once I have moved past these, I usually need something loud and completely distracting to, well, keep me from getting distracted. I often listen to Dream Theater. This is a fine line I tread, however. For instance, I adore Arjen Lucassen and everything he does, but Ayreon (his "group") is too distracting for me to listen to it while I am writing. I simply get into it too much. No, if I need more than this, I have to go all the way. If your parents would complain that it is just noise, that's what I would like. That noise is too much for my mind to latch onto, but just enough to keep it searching for something.
However, in the end, when I am truly in the mindset, when the words are there, ready to pour from my fingertips onto the page and all I have to do is guide them into place, when I cannot stop myself from writing, then music is my enemy. I will put on my large, noise-blocking headphones (I really do swear by Sennheiser), and leave them unplugged. Then, I will let my inner monologue create my music.
What do you listen to when trying to write?