Can LED be used for both light emission and sensing
Try this circuit: 







simulate this circuit &ndash; Schematic created using CircuitLab

The transistor (non critical, any general purpose NPN will likely work) amplifies the weak photocurrent from the LED used as a photodiode. Make sure you get the polarity right on the LED or you will damage the LED and the transistor. Connect a 1K in series with the LED if you are not sure (the LED should not light!). A couple hundred nA from the LED/PD should drive the input low (assuming there is no additional loading from the input eg. pullup). 

The LED will produce a current from wavelengths that are similar or less than the emission spectrum, so a green LED will respond to blue (or green) light but not respond to red light. 



If you wanted an analog voltage to feed to an ADC to measure the light, you can use a high value resistor (eg. 20M\$\Omega\$) and an op-amp voltage follower buffer (eg. MCP6001). The resistor value may be higher or lower depending on the desired sensitivity and the particular LED you happen to find- commercial photodiodes with guaranteed specs can be quite cheap if you tire of characterizing parts yourself (or they can be very expensive if you need high performance - eg. 300ps response time, 50pA dark current and ~1A/W sensitivity)