With switch open, there is no current thru the 10k ohm resistor. Therefore the transistor is off and can't turn the LED on. When switch is closed, it allows a small amount of current (micro amp range) to flow through R - turning the NPN on and switching on.