Specifically, yes, it's legal to have earphones in both ears, or rather there isn't a law saying you can't. However, if you caused an accident and it was proved to be because you couldn't hear, or were listenning to music so loud it distracted you, then you might be liable to be prosecuted for driving with undue care and attention. Just as you would be in the same situation with your car stereo too loud. So, used sensibly, it's perfectly OK and perfectly legal.

Regards,