Thankfully, we have a definitive answer thanks to science.
Background music improves your mood and enhances perception while working. As reported in WebWorkerDaily, that's the conclusion of a study at the University of WIndsor in Canada, which tested the effect of music on software developers. People in this study generated the lowest quality of work -- and took the longest to complete -- without any music at all. And interestingly, they noted increased curiosity when exposed to background music as well.
Music makes you feel calmer. According to the Journal of Music Therapy (I bet you didn't know that was a thing), listening to your favorite music lowers your perception of tension. That's true even if your favorite music is energetic, which will actually raise your heart rate and respiration.
Music can help you focus. CNN weighed in on this subject recently. According to Peter Quily, an adult Attention Deficit Disorder coach, music can have positive physiological effects on patients who suffer from adult ADD. Specifically, listening to music can increase dopamine levels in your brain -- which in turn can help you focus.