A Bright unexpected flash can disorient a person, causing their
head to spin, make them dizzy, or make them see stars, similar to head trauma. The quick, bright light overwhelms the optical receptors, and the brain attempts to compensate.
In cartoons, the spirals over their eyes imply this condition.
It is a type of Flicker Vertigo:
Flicker vertigo, sometimes called the Bucha effect, is "an imbalance in brain-cell activity caused by exposure to low-frequency flickering (or flashing) of a relatively bright light."1 It is a disorientation-, vertigo-, and nausea-inducing effect of a strobe light flashing at 1 Hz to 20 Hz, approximately the frequency of human brainwaves. The effects are similar to seizures caused by epilepsy (in particular photosensitive epilepsy), but are not restricted to people with histories of epilepsy.