EDIT: The answer that I originally referenced got deleted, so I will edit to incorporate info from both...
One common approach for distance finding is to use an IR sensor for example, the SHARP one found here (https://www.sparkfun.com/products/8958). Basically, this is a IR LED and a 1-D image sensor combined with some onboard DSP. The 1-D image sensor picks up the reflected light at an angle which depends on the distance the object is to the sensor, as shown here:
AFAIK, the IR distance sensors are only available with analog voltage ouput, so you will need a free A/D pin on your microcontroller.
Another alternative is an ultrasonic sensor. There are cheaper alternatives, but one that my students have had success with is this: https://www.sparkfun.com/products/9495.
This particular device is convenient because it has 3 different read out methods. You can use either an analog voltage (which you can digitize using an A/D converter on a microcontroller), or read serial data directly. You can also have it output a PWM, which might be useful if you are driving some servo motors directly (not sure if it is actually servo compatible).
There are some advantages and disadvantages of using ultrasound vs. infrared. Ultrasound is more robust to different surfaces, and the beam width can be varied by choosing a particular sensor (so you can have it pick up obstacles in a wider or narrower area). On the other hand, having multiple sensors might cause interference, although there are ways to get around this. Also, ultrasonic sensors tend to be more expensive than the IR sensors previously mentioned.
Also, the Maxbotix ultrasonic sensors feature Jesus (look carefully on the PCB). This could be an advantage or disadvantage depending on your application.