The external and internal lights come from the same place. When you see a real light, or imagine a light, there is activity in the same part of the brain - in this case a part at the rear of the brain called the visual cortex. It is here, neuroscientists believe, that information associated with visual signals can first come to our conscious awareness. So we see an imaginary light by creating an internal simulation, a simulation which is made by hijacking the machinery we use to perceive a real light. The real mystery is deeper. It is not how we see an imaginary light, but how and why we experience any light at all. Why doesn't the brain process the light (or imagine the light) without creating this sense of self-experience that we call consciousness? Without consciousness there'd be no "you" around to see an imaginary light when you closed your eyes. I'm afraid to say that science hasn't got a good answer to that question yet!
Visit Dr. Stafford's excellent website about brain science: MindHacks.com Also, check out our page on Canadian scientist David Hubel who won the Nobel prize for figuring out how vision worked by discovering the visual cortex. Details of how the visual cortex works on Wikipedia.
making a small donation to science.ca.