When you rub your eyes, sneeze or stand up too fast, you might see bright flashes or squiggly lines. These are not figments of your imagination but actual sparks of light inside your eyeballs called biophotons. All cells within the human body let off light or bioluminescence.
You don't see them, of course, except inside your eyes, where the brain is usually able to ignore them.
When you apply pressure to your eyes, more biophotons are created than the brain can process, and the result is visible flashes.