I can listen to music when I'm doing easy work, but not hard work. I can listen to it while tracking down a bug (most bugs, anyway) but not while making something new.
I'm kind of the same way, but it depends if there is someone singing in the music. I find vocals distracting when I need to concentrate. Also, listening to my favorite music is distracting. To concentrate when working on something difficult, it helps if I choose music according to these criteria: 1) no singing in the music, just instruments 2) listen to music I don't love, but moderately like, such as jazz, classical, or trance. (I love vocal trance, but if I want to stay in the zone, I listen to instrumental trance).
Same here. Music helps me focus on easy tasks, as if it were using idle brain cycles that would otherwise get bored and seek distractions. Conversely, when in deep thought, music feels like an unwanted distraction and I get an urge to turn it off.