Photopsia
Etymology
NL., fr. Gr. fw^s, fwto`s, light + 'o`psis sight.
(Med.)
An affection of the eye, in which the patient perceives luminous rays, flashes, coruscations, etc. See phosphene.
from Webster's Revised Unabridged Dictionary (1913)
These can be caused by eye diseases, or simply by pressure--the flashes one sees when one's eyes are closed, esp. if a little pressure is applied with the hands to the closed eyelids, are phosphenes.