But riding with headphones, or while deaf for that matter, has no effect on a driver's ability to see and avoid you
not being able to hear sounds around you does have an effect on your ability to be aware of cars. it can be mitigated but personally i use my ears a lot when bike riding. I also wouldn't want to be in the "zone" that good music can put you in, unless i was out on some empty road
i think if you keep the music low it probably doesn't have much of an impact on safety however