If there's no light detected, T1 acts like an open circuit and Vout goes to Vcc.
If there is light detected then Vout is pulled down to GND.
That's the theory anyway. Make sure your detector is actually a phototransistor, not a photodiode, or you'll need a different circuit.