When this question was asked in April 2014 the question to be answered in deciding whether or not to allow this would have been "Can other people also hear the music?" If "Yes" then it is disturbing and not allowed. If "No" then no problem.
However, events, technology and the rules have moved on.
The FIDE Arbiters Commission publishes the FIDE Arbiters' Magazine twice a year. In the August 2016 edition it related the story of a visually handicapped player who used an earphone to relay moves. It reported:
The cheating method was simply an electronic earpiece that was
actually a Bluetooth device. This was not noticed until the player had
posted consecutive tournament results that were astronomically better
than before. He scored only 50% at novice level, but then within a
year, while still unrated he won a rated section 8/9, and then again
scored 8/9 with a performance rating near FM-level.
These 18 games were fully analyzed, and he was caught with
continuously high correlations to chess engines, especially Rybka.
Therefore, he was asked to take chess testing. At first, he accepted,
“naked if necessary”, but then he eventually declined, saying that he
has stopped studying, and that his abilities have thus dropped off
dramatically. All of these games have since been adjudged lost.
Now the FIDE Laws of Chess say this:
11.3.2.1 During a game, a player is forbidden to have any electronic device not specifically approved by the arbiter in the playing venue.
However, the regulations of an event may allow such devices to be
stored in a player’s bag, provided the device is completely switched
off. This bag must be placed as agreed with the arbiter. Both players
are forbidden to use this bag without permission of the arbiter.
As arbiters we are warned to look out for these devices. Smart watches are usually banned. Old fashioned digital watches are still mostly OK. Earpieces are not. Of course all of these things may be permitted in certain lower level competitions with the arbiter's permission. But if you wear an earpiece because you have hearing problems you should first get permission from the arbiter or remove it during the game.
Wearing an earpiece to listen to music is definitely not allowed.