Everyone learns differently. It therefore stands to reason that everyone studies differently, too. Whether playing music in the background while you study is a good idea or not absolutely depends on what type of learner you are.
Some people require absolute silence in order to maintain concentration while they study. These are the people who can go to the library and actually get some studying done.
Although studying in silence is considered by many to be "the one right way" to study, it just doesn't work for everyone. If your mind tends to wander to other topics when you study, having some familiar music playing can give that wandering part of your brain something to focus on — something that won't use up a lot of your brain power — leaving the rest of your mind to focus on your studies.
Regardless of ideal study habits, anyone who is forced to study in a public place — like a coffee shop, bus, or subway — might benefit from having some tunes on hand. When absolute quiet isn't a possibility, familiar music flowing through headphones and into your noggin can be much less distracting than the cash register dings, street sounds, and half-heard conversations of those around you. By blocking out those distractions with music, you can more easily concentrate on your studies.
The key, though, is to listen to music you're familiar with. Music you know by heart doesn't require as much of your attention as the latest album that you're still trying to get into. Instrumental (that is, wordless) music is an even safer bet because there aren't any words to insinuate themselves into the words in your textbook or the thoughts in your head.