While I wrote my dissertation, and ever since, I've listened to music while writing papers. I find it helps me to tune out everything else and tune into my writing. The music becomes a cue for me to write, a way to tuck myself into the writing, regardless of what is happening around me. I hadn't even considered that the music may be distracting me, but of course, this is a possibility. My sense is that I need the music most at the very start of the writing process, because if I run out of songs before I finish writing, I don't seem to notice it right away, as I would expect to.
In any case, I'm going to try an experiment the next two weeks. I'll log the times and productivity level for writing with music vs. writing with earplugs, and post the results in my sidebar. Anyone care to make predictions on the results? Do you listen to music or use earplugs?