Quite an old topic, really...
Today me and my friends discussing a bit about headphone and speaker. I said that at the same price, headphones would do better than speaker (assuming that it's the best buy for that price), and he said otherwise...
Now to compare:
neither of them are winner, it depends on your musical needs. Speaker lets the hearer and everyone around him to hear what to her, whether if they want to hear it or not, in contrast, Headphones only giving sound to one who had the headphones, and not other people even they want to hear it (well, maybe it could, a bit, if you set it loud enough). this is the basic difference between headphones and speaker, if you don't even know this, just read anything else. Like... kindergarten's book?
Speaker of course. With speaker you don't need to be entangled in wire and weighing your head with a heavy headphones. just lay down on sofa or something, grab your snack and enjoy.
Area of hearing:
Headphones... hand down, in many ways. You can bring your headphones everywhere you want. No, I'm not talking about portability, I'm talking about area where you can get the best sound quality. If you have speaker for quite a while, you will know that there's a "sweet spot" where the speaker will sound best, and that's the one that confine you. You can't move around getting the best sound with speaker while headphones will always sound best wherever you are, as long you get it equipped.
Since we are talking about the same price range, Headphones are definitely win. You will need to pay a LOT more to get the same fidelity from speaker than headphones. for a comparison, a 100$ headphones will have higher fidelity than most speaker in 100-300/400$ range.
Since 5.1 speaker can create a surround sound they will surely win!. That's what you thought? Ok, you're mistaken... for some surround sound, especially 3D audio generated by computer, headphones will do much more than your speaker. You have two ears (sorry, if you think you have more than two), so by default, you can only hear difference by right and left. You can tell whether the sound come from front back, up etc, is by processing the complex differences in phase, time delay and frequency balance (it's done automatically by your brain, you don't need to think about it).3D game audio uses Head Related Transfer Function (HRTF) algorithms to fake the effects of the pinnae, the head and various listening environments, so that injecting the sound straight into the ear canal can produce the impression of real 3D audio sources. It's impossible to do this with speaker, since they will let the sound that's only intended to your right ears go through left ears and vice versa.
For music, they use what called "binaural recording, using 2 hi-fi microphone which located at dummy ear. well, picture will save me from explaining it.
this is used to record the frequency shift which happened because the sound is being reflected in your pinnae. With this, headphones can emulate the surround sound as much as possible.
If you don't know, speaker and earphone can deliver same quality of bass. well, why speaker is more favorable in this area? this is the culprit:
A "bass shaker"
This thing is the one that makes the speaker can shake your limp. This "bass shaker" is the one who make the air around you (and yourself) shaken, which headphones don't have.
Overall, I enjoy using headphones more than speaker. The rest is based on your personal enjoyment, it's a subjective matter, really. If you love speaker, then go for it, vice versa.