People need chunks of quiet time to get work done. Big cubicle farms with open office plans increase stress and don’t make for happy workers (Paul, 2012 summarizes). But, using earbuds might help people focus on the job at hand:
Although it might seem that importing one’s own noise wouldn’t be much of a solution — and although we don’t yet have research evidence on the use of private music in the office — experts say that this approach could be effective on at least one dimension. Part of the reason office noise reduces our motivation is that it’s a factor out of our control, so the act of asserting control over our aural environment may lead us to try harder at our jobs.
— Paul, A.M., 2012: Why the ‘Open’ Office Is a Hotbed of Stress in Time.
It has been my observation that the earbuds help a lot in helping students stay focused and on task. However, for the middle school students at least, I usually require them to to have preset play lists so they’re not distracted by skipping through songs every five minutes. I also recommend quieter music because it tends to be less distracting to the student, and there’s almost always someone who’s volume is so loud that everyone else in the, now very quiet, classroom can hear.