Why does an incandescent light bulb burn out just as it is switched on instead of while it is glowing?
An incandescent light bulb has a metallic filament, which is heated to a very temperature when an electric current flows through it. Though most of the radiation emitted is in the infra-red region a small amount of visible light is also radiated.
When an electric bulb is put on, the filament is cold and its resistance is low; as a result a large current passes through the filament. This rapidly heats it up causing a lot of stress.
With age, the quality of a bulb's filament deteriorates and it is thinner in some areas than others. When the bulb is switched on the bulb the thinner areas are heated to very high temperatures suddenly and this multiplies the chances of the filament burning out at these locations.
A third factor that makes a filament more vulnerable to burning out when the bulb is put on is the fact that filaments are created as coils. These act as electromagnets. The initial current makes sections of the filament move due to electromagnetic forces and they rub against each other.
The reasons provided above increase the probability of the filament in a bulb failing when the bulb is switched on rather than when it is glowing steadily.