Wikipedia has a detailed explanation on [Phosphene](https://en.m.wikipedia.org/wiki/Phosphene) , but the gist of it is that instead of seeing things normally due to light triggering the optical nerves, triggering the optical nerves due to other causes like physical pressure (such as pressing on your eyelids) can cause you to ‘see’ patterns.
Pushing on your eyes transmits stress to your retina. The cells in your retina respond not only to light, but also to changes in pressure. So your eye/brain interprets this as light, and your brain tries to visualize it as something real.
Doing this is NOT a good idea. Putting undue pressure on your retina can cause it to tear and even detach. In a worst-case scenario, you could become permanently blind.
*Source*: I have retina issues and have spoken to multiple retina specialists.
Latest Answers