It depends for me, if I am working on a tough logic problem I usually have to turn down any music with lyrics or high complexity as I will try to focus on the music instead. Otherwise it helps me stay focused by catching my moments of distraction, like a baby sitter for my brain.