Music and stories have long been intertwined of course. So many wonderful songs are stories set to music effectively. Music can and does play a part in stories. It can be used to show character. Movies, of course, rely on music to help set mood. Think of the Jaws theme by John Williams. Every note of that puts pictures and therefore stories in your head (and possibly might put you off swimming in the open sea but that's another matter! There are advantages to just swimming in the local public baths!!).
I write with classical music playing. (I often listen to Classic FM). Unlike other styles of music, it hasn't affected my mood (and therefore what I write!). It does help me relax and I write more (and I hope better) when relaxed. I've also found it helpful to think of the kind of music my characters would be fans of when I'm creating them. It almost certainly won't come into the story I write but it fills out my knowledge of the character I'm about to place before a reader. That has to be a good thing.
And I must admit I loved choosing the music for my book trailer for From Light to Dark and Back Again. The track used is an adaptation of Camille Saint Saens Danse Macabre (used as the theme tune for the BBC detective series Jonathan Creek).