What you have is called the photic sneeze reflex. Its not an allergy. The sneezing is a response to sudden bright light. Sunlight exposure is the usual culprit. But a camera flash or any bright light can trigger the sneezing.
No one knows the exact cause. It seems to be related to the change from darkness to light rather than the brightness of the light.
One theory is that light hitting the retina in the back of the eyes triggers the optic nerves. The nerves send a signal that stimulates the vision centers in the brain. But the nervous system is interconnected. So a signal also gets sent to the brains sneeze center. Its located near where the spinal cord enters the brain.
Another theory suggests that photic sneezers have nervous systems that are especially sensitive to light. Intense light floods nerve circuits. So nerves in the nose are activated along with other nerves. This results in nasal congestion and that familiar tickling sensation that leads to a sneeze.
The photic sneeze response is usually nothing more than a temporary nuisance. But if youre driving, you may want to be extra careful coming out of a tunnel. Not only could you be momentarily blinded by the light, but you might close your eyes while sneezing.