Depends on the game, a game that tends to draw you in more like say PAYDAY2 I won't listen to music but if it is something a bit slow paced like say a Civ game or most strategy games, I tend to play music, in some cases when I am playing a multiplayer games without friends on teamspeak I tend to play some music as well with moba games.
In short I would say games with a good soundtracks like racing games, singleplayer fps games and sidescrolling platformers like TRINE, I tend not to listen to music, but if I play any game that tends to be a bit quiet in the sense that all there is, is "sound effects" and is not really engaging like moba's, strategy games, and MMORPG's I would listen to music.