As electricity moves through the wire in the bulb, the electricity is transformed into thermal energy that heats up the filament in the bulb, causing the heated filament to glow.