I never used to but when I was writing my 24 Hour RPG, , I bunged on a mix of 'Victorian Steampunk' music I had on my computer. A mix of industrial music and some flights of fantasy classical-seque music. I think it definitely helped me write Cloudship - particularly to stay focussed. At work, I always write to music, the tempo depending on the type of work I'm doing.
Now I've started writing to music (Bladerunner OST by Vangelis, The Prodigy, Pendulum, Pop Will Eat Itself, One Minute Silence, Pitchshifter, 2001 A Space Odyssey Soundtrack)