Answer:
A light bulb has a resistance inside of it, when current flows through the resistance, the electrons interact with the electrons and particles inside the resistance. Those interactions leave energy in the resistance in the form of heat, so as the current flows through the resistance, the temperature of the resistance increases until the point it starts to become bright and starts radiating light (this happens really fast, that's why the light bulbs light up almost immediately)
When she puts the slider at position A, she reconnects a circuit. Now, for that circuit a current can flow, and pass through the resistance in the light bulb, this resistance heats up, and starts radiating light.
When she returns to position B, the circuit is not connected anymore. This means that the current flow stops, then there is no more current flowing through the resistance, then the resistance beggings to cool down, and stops radiating light.