How do I connect a photodiode?
Photodiodes are easy. You connect them reversed to the +5V (cathode!) and the anode to a resistor to ground.  



If light falls on the diode it will cause a current through the resistor, which will cause a voltage across it. So you can choose the sensitivity by choosing a value for the resistor. You'll have to make sure that there remains enough voltage drop across the photodiode.  



Note that the SFH3410 is a phototransistor, you use them in the same way, collector to +5V, emitter to resistor. They have a much larger current, in fact they contain a photodiode, whose current is amplified by a transistor. (Nice product, that SFH3410. I've also used it.)

  

This is the most important graph from the datasheet. It shows current as function of luminosity. Note that both scales are exponential. 10 lux is twilight, 1000 lux is a brightly lit desktop for precision work. Direct sunlight can reach 100 000 lux. So if you want to measure inside lighting you could use a 12k\$\Omega\$ resistor, which will give you 3.6V at 1000 lux. The SFH3410 will work well up to 4.5V output at a 5V power supply.