Exam time. Seeing flashes of light or stars can be associated with eye problems (pvd, retinal tear, etc) or high blood pressure. In pregnancy it can be associated with preeclampsia also. Most doctors want to be called or have a patient seen quickly if such symptoms. A physical and eye exam plus evaluation of blood pressure and tests can help determine what's occurring.
Common issue. Symptoms of flashes of light are quite common; usually they are associated with the normal contraction of the vitreous gel that occurs with time. The contracting gel "tugs" on the retina- the brain then interprets this as a light flash. Only rarely is this associated with a retinal tear. Flashes can also be triggered by circulation issues in the brain, such as a migraine or postural hypotension.