Many different chemicals are affected by light in different ways. Some take photons of light which can cause electrons in the chemical to become excited and hump up to a higher energy state. In certain materials these electrons drop back down again and give off the energy as photons of light. This can happen fast or slow, depending on the material.
When the energy’s given off slowly it is often called phosphorescence and can produce a soft glow that can emit visible light for a long time, newer materials for several hours even. As an interesting note, glow-in-the-dark stickers still glow even in the light, the light is just too soft to see.
Connor Skates, Science Museum