You can get more accurate within a certain range on the IR sensors, however i’m not sure how well they will work in sunlight. You also need a reflective surface or they won’t work (ie: a red surface probably won’t yield a result). Beamwidth on the sharp sensors is pretty good, if you orient them vertically should shouldn’t get much in the way of issues detecting things that are not directly in its path.
Sonar is less accurate however works over a much wider range. You can also get signals bouncing about a bit which will reduce your sensitivity - however the more expensive units tend to correct for this. Sonar is also slower (signal wise) so if you’re moving a decent speed then it’s going to be more inaccurate due to the Doppler effect. Sonar will work indoors/out in a much wider range of conditions. Sonar doesn’t tend to like “soft” targets, things that absorb sound, such as cushions/carpet/fabric things.
It’s really going to depend on your application and where your robot will be used. If you only use it to do maze solving for instance a light sensor would be much better than sonar assuming a non-red maze. If you’re mapping objects outdoors, sonar will probably be the best route. If you’re looking around your house where you might have couches and such - a combination of the two would probably be a good idea.
Both have strengths and weaknesses. They are not mutually exclusive technologies - go all out and use both!