These flashes of light are quite common when using transcranial electrical stimulation, and are known as phosphenes. Usually this will happen when an electrode is placed near the eye, and is a result of current running across optic nerves. While it may seem scary at first, this phenomenon has been recognized and studied by the scientific community and is understood to be a harmless side-effect of tDCS. Phosphenes can be reduced or even prevented completely by moving the electrodes further away from the eyes. More can be read about TES and Phosphenes in this PubMed Article.