Well, having only used ultrasonic to any great extent, I would say that people only use it for applications where cheap and dirty distance measurements need to be made. I am also probably right in thinking it is tonnes better for longer distances.
Intra red seems to be more accurate and less noisy. Plus I belive it would be easier to modulate the IR since it has no mechanical part attached to it. Background noise (sound for ultrasonic, and infrared light for infrared) is always going to be a limiting factor, although this is why you would modulate the signals.
Again, i'm still a bit shifty around these matters. But I hope that helped.