Generally speaking I like some music in the background when I'm writing.
Mostly the music doesn't have to have something to do with the story, although I often pick something thematic when I'm planning the story and include that in the mix so I can cue it up quickly if I'm feeling stuck. This helps me to get in the mood. (I usually include a snippet of the lyrics from that song at the start of the story.)