I ride with earphones in, I always look rather than listen even when walking – they make no difference to my safety.
I struggle slightly with this one I'm afraid. I would consider the safest you could possibly be would be to have all of your faculties working together at all times. After all unless you ride with mirrors then you can't be looking where you're going AND over your shoulder at the same time. Your ears provide a valuable early warning system of things approaching from directions that you aren't looking in.
Listening to music also represents a distraction which slows your responses to things around you. It may not be much but it could end up with you under a lorry.
We get angry with car drivers for smoking/talking on mobiles/playing with sat navs etc etc because of the risk they pose to others. A cyclist doing the same is equally distracted but it isn't considered as much of a big deal. It really should be as I can only imagine the horror and guilt of a car driver who ended up with a cyclist splattered on their windscreen.