I think it can. Good music can really enhance my immersion, while annoying or repetitive music can take me out of the experience. I also sometimes find the BGM too loud, so I tend to lower the volume when that happens.
I love video game BGM, so listening to the music is one of the things I look forward to when playing a game.
When I come across a really beautiful melody, it can make the whole gaming experience even more vivid and turn it into a wonderful memory.
However, when I play for long periods of time, I can sometimes get tired of songs that are too repetitive.