This is used to regulate the current flowing through the diode.
Do I need this?
YES! You must NEVER connect the LD directly to the power supply because it WILL die!
Can I just use a resistor?
Theoretically yes, but the current will not stay constant as the components heat up and the battery voltage decreases and this can shorten the diode's life.
But kipkay didn't use any driver...
Why do you think we have to deal with n00bs crying about their dead Laser Burning Flashlight Hack? (Just read the text above...)
A lot of people ask me about the diode's forward voltage stuff. This is a constant current driver. That means, it will adjust it's output voltage in order to keep the optput current fixed. So, it doesn't matter if you connect a red (2.2V), IR (2V), 405nm or a 445nm (>4V), as long as your power supply's voltage is above the diode's voltage + 1.5V, your laser will be running fine at the set current.
Also, the answer to question: "What voltage is diode XY?" can't be answered directly. Every diode's forward voltage (Vf) depends on her type and on the current. For example, a LPC-815 has Vf from 1.8V up to about 3.2V, as the current increases. Every diode has a PIV plot, which describes it's dependancy between the current, optical power and voltage. Google your diode's PIV plot, such as "LPC-815 PIV" or "22x red PIV" and so on.
Since we're building a red laser here (based on LPC-815), here's the PIV plot for LPC-815: http://www.diy-lasers.com/images/LEC_LPC-815-red.png
You can either buy one or build one (if you can)
the most common commercially sold drivers are:
http://laserpointerforums.com/f64/lava-micro-flexdrive-driver-lavadrive2-fits-pens-22502.html (usage instructions: http://hacylon.case.edu/ebay/laser_diode/MicroFlexDrive_V5_manual.pdf)
The most common DIY driver is called DDL driver and it uses LM317 as current regulator.
you will also need a thing called TEST LOAD, which consists of 4 1N4007 diodes and 1 1ohm resistor wired in series (check the pics). To use it, connect the output terminals of driver to test load (+ on the diode's anode, - to the resistor) and measure the voltage across the resistor. With 1ohm resistor, 1mV of voltage equals to 1mA flowing through the setup. Now rotate the small potentiometer, until the DMM reading matches your desired current.
recommended currens for various diodes: