An electric light bulb works by conducting an electric current through its wires and the filament once it gets connected to a power supply. As the current flows through the components of an electric bulb, it generates light by increasing their heat levels.
The electrons that comprise the electric current freely move from an area with negative charge to one with positive charge because they’re not tightly bound to their atoms. As these free electrons move through the filament, they constantly collide with its atoms. Each collision results in an amount of energy that is capable of inducing the vibration of an atom, which effectively increases its heat.
When atoms vibrate, their bound electrons can be boosted to a higher energy level. As the energy level falls down to a normal value, electrons release the difference in energy levels in the form of photons, thus emitting light. Atoms that comprise metals typically emit infrared light through this process, although they are able to emit visible light if they are heated to 4,000 degrees Fahrenheit. The ease with which a conductor heats up depends on its thickness and the level of resistance it poses to the movement of electrons.
Electric bulbs normally use tungsten for the filament because it can tolerate extremely high temperatures necessary to create visible light without melting. The oxygen-free chamber in which the tungsten filament is housed prevents it from catching on fire.