Though it's the world LEDs today, an ordinary flashlight bulb can also be considered a useful light emitting candidate especially because it's much to configure than an LED.
The shown circuit diagram is quite simple to understand, a PNP transistor is used as the primary switching device.
A straight forward power supply provides the power to the circuit when mains is available.
As long as power is present, the transistor T1 remains positively biased and therefore remains switched OFF.
This inhibits battery power from entering the bulb and keeps it switched OFF.
The mains power is also utilized for charging the involved battery via the diode D2 and the current limiting resistor R1.
However, the moment AC mains fails, T1 is instantly forward biased, it conducts and allows the battery power to pass through it, which ultimately turns ON the bulb and the emergency light.
The entire unit may be adjusted inside a standard AC/DC adapter box and plugged IN directly in to an existing socket.
The bulb should be kept protruding outside the box so that the illumination reaches the external surrounding amply.