A lot of writers use music when they write. Stephen King credits the beginning of The Stand to The Eagles. Some can't write to music with lyrics at all.
Me, it varies. Sometimes, I create a whole play list. This is most common when writing a novel. Sometimes, it's a song or two. Sometimes, it's just one song to get me over a hump.
"Between Despair and Ecstasy" is a short story (that is being redone into a novel at the editor's request) about vampire hunters. There is a scene in a vampire nightclub. While I was writing this rather gruseome scene (one of several), I played Bauhaus' "Bela Lugosi's Dead" on repeat for about an hour. My family was ready to scream at the industrial drone.
While writing "Showdown at Yellowstone River," it was Marty Robbin's "Big Iron" and The Highwaymen's "Silver Stallion."
When we wrote Alive on the Inside, Naomi and I came up with a playlist that sort of followed Nick's journey out of closeted hyper-religious life into the carnival as the Pain King's lover.
Long Black train--Josh Turner
Entry of the Gladiators
Strange Love--Depeche Mode
Closer--Nine Inh Nails
Personal Jesus--Depeche Mode
Pain--Three Days' Grace
Hurt So Good--John Cougar Mellencamp
Happiness in Slavery--Nine Inch Nails
Comfortably Numb--Pink Floyd
On the other hand, when writing Heart of a Forest, we had a much different style of music.
Overture (Whistle Stop) from Disney
Siul a ruhn--Skylark
Scarborough Faire--Sarah Brightman
She moved through the fair--Pentangle
Wild Mountain Thyme--3 Pints Gone
Ooo da Lolly--Roger Miller
May Queen--Heather Dale
Devil's Dance--Gil Shaham
Robin Hood and Maid Marian--Wallace House (an actual Child Ballad)
Everything I do--Bryan Adams
Love--The Disney version
Labyrinth Waltz--Kim Robertson
Circle of the Lustful--Medieval Baebes
Men in tights
Full Circle--Loreena McKinnett
Robin, the Hooded Man--Enya and Clannad
I find music gives me a pace to type to and the songs can set the tone for the writing.