Good idea! In fact, light is used in ways that are very much like sonar, all the time.
Sonar involves sending sound waves out from a sound transmitter -- some kind of speaker on a submarine, or out of the mouth of a bat. The waves reflect from some surface, say another submarine, or a flying bug, and the reflected waves are picked up by a sensitive microphone or ear. The signals are then interpreted for the presence of something interesting.
People use light in much the same way. You can shine a flashlight in the dark and look for things that reflect the light waves, using your eyes and brain to interpret the reflected waves. By shining different colored light (or white light, which is all colors together) and looking at what colors you get back, you can gather more information about the objects you may find (what color they are). A bat sends out a chirp at a mixture of frequencies and can tell which ones come back from where and when, and at what frequency, to help it locate insect prey.
People use light in complicated ways too, taking advantage of its wave properties and the speed with which it propagates. If light is bouncing off of a moving object, it can change its frequency (the doppler shift). Radar works much like sonar, but with radio waves. In addition, by measuring the frequency of the reflected radar pulse, information about the speed of the reflector is obtained. The police use this all the time on the highway.
Precision information about position can be gotten from the speed with which light travels. Satellites with precise clocks on them send pulses out at regular intervals. By measuring the time differences between receipt of pulses from these satellites, accurate position information can be deduced (Global Positioning System, or GPS). Interfering light waves from lasers can be used to measure exceedingly small distances as well, by mixing the reflected light with outgoing light of the same frequency (lasers are used for this).
Holograms use a similar principle, in which the reflected light from a laser shining on an object is combined with light straight from a laser to form an interference fringe on film, which can then be reconstituted with laser light to make an image that looks like the original. All of these uses of light bear a strong resemblence to how sonar works to locate objects with sound.
(published on 10/22/2007)