In the case of an incandescent lamp, the most likely cause of failure is breakage of the filament, caused usually by gradual evaporation of the filament material as the lamp is used.
Less common causes of failure are air ingress to the bulb causing oxidation of the filament, and breakage due to shock or vibration.
Failure of the electrical connection between the lamp cap and glass bulb can occur but is a very rare fault.
In the case of discharge lamps, the most common failure mode is the gradually burning away of the electrodes.
Air ingress and physical breakage being other causes.
In the case of flourescent lamps, the common failure mode is that the electrodes lose their emmisive properties and wont emit enough ellectrons. Sometimes the filaments at the ends go open circuit, in which case the lamp may work on some ballasts but not others.
Sometimes the mercury in the tube is all used up*, the lamps still lights then but gives a very dim lilac or purple light.
In the case of CFLs that have a built in ballast, then failure of this is another failure mode.
*The mercury is not actually consumed, but forms compounds with the glass tube or the other contents of the lamp, and is therefore not available as mercury vapour for correct operatiion.