These flashes of light could be due to a variety of different causes. When anyone reports flashes of light, I always want to make sure that they are not suffering from retinal detachment. This is where the retina brakes off from the back of the eye usually due to some sort of head trauma. This does not sound like you. Glaucoma is caused by high pressure within the eye and can cause flashes of light, eye pain, and sometimes vision loss. It also causes an increase in the cup to disc ratio, which is what you may be referring to with "cupping" in the back of both eyes. Migraine
headaches have also been known to cause various different "auras" which can be flashes of light similar to what you are experiencing. If you are having accompanying headaches, this should be considered as a possibility.
Please schedule an appointment with an ophthalmologist
. He or she can listen to your description of the flashing lights, test your vision, and examine the back of your eyes very carefully. Your ophthalmologist will be able to distinguish between all the different possible conditions that you could have and initiate the appropriate treatment. Good luck.