Flashes of light are "sparks" that you may see when you move your head. They can happen when the vitreous gel in your eye pulls or tugs (causes traction) on the retina. This creates nerve impulses that appear as flashes of light.
The flashes are easier to see when your eyes are closed or you are looking at a dark area. They may come and go.
Flashes of light are often harmless, but they can be a sign of a retinal problem and should be checked by a doctor right away.