I think upbeat music can keep you going at a steady pace, but melancholy music can be quite intoxicating, making you more reflective about what youre doing.
I also think that having music on in the background can distract you and slow your progress/reduce the quality of your work. Even if you are doing something creative in most circumstances. But I still do it :]
It dpends on what I'm working on. If its a sad piece of at or whatever then start listening to songs which I believe relate to it,If it's a good happy picture, then I start blasting the upbeat feel good songs. Music always gets me into the zone of it, it just helps to be able to use something to relate.