I've always written with music playing in the background. When I was a teen writing at my desk in the basement, the music helped drown out the other members of the household. The same applied when I was trying to write while in college in my dorm room and later my room in the boarding house.
But the music was never just a form of 'white noise'. I usually choose music that would set the mood of the scene or the overall book. Soundtracks, instrumentals, New Age and electronic music are usually among my choices. For one important chase scene in an early book I remember playing "Classical Gas" over and over again.
That lead me to create the first of two rules I have for music listening/writing. Number one: Wear headphones - especially when in an area with other people who may not appreciate hearing your choice of music over and over and over again.
Rule number two: except for very rare scenes, no music with vocals is allowed. That's because if there is singing, I usually end up singing along and not writing. Which defeats the purpose of having music playing in the background.
The exceptions for that rule include Celtic music or the Lord of the Rings soundtracks or groups such as Clannad or Enya if I'm writing about elves or my wizards.
For science fiction writing I tend to use soundtracks from science fiction films and television shows or electronic music. I used to be able to find good electronic music in stores, but now I rely on visiting the Horizon Music booth at local science fiction conventions.
For fantasy writing I will use soundtracks from fantasy films such as the Lord of the Rings trilogy, Waterhorse, How to Train Your Dragon, or Celtic or New Age music. The Soundscapes channel on my cable TV network often has interesting pieces that I can then track down via Amazon.
It's not that I can't find classical pieces that make me visualize magical forests and fantastic creatures or inspire me to write about spaceships sailing starry vistas. I can and have. But these are what have worked for me. Right now the CDs for the current writing projects include Transformers Prime Season One music, Sherlock: Music from Series Two, the Real Steel soundtrack and several assorted electronic music CDs.
What are your favorite choices of music to write or read by?