Photo transistor in parallel
When light is present, the phototransistor will conduct better than in dark conditions. 
This results in a lower voltage on the base of the transistor (the phototransistor and resistor form a so called voltage divider). 

When the voltage on the base of the transistor is lower than about 0.7V (transistor base-emitter voltage) + 1.8V (LED forward voltage) = 2.5V, the transistor will turn off and the led will be off.