Sneezing (thenasoocularreflex) is often immediately associated withallergies, but there are other causes.
With allergic rhinitis, cells in your nasal mucous membranes release histamine.
This chemical acts on various nerves within the nasal mucous membranes, which causes you to sneeze.

Verywell / Jessica Olah
It also causes other typical allergy-related problems, like a runny nose.
They work against the histamine that is producing the sneezing and runny nose.
You should also take physical measures to reduce the allergens that are producing the reaction.
Infections
Respiratory tract infections, such as the common cold, can also cause sneezing.
Colds cause mucus production, which in turn stimulates various nerves within the nasal mucous membranes.
This is one of the reasons it can sometimes be hard todistinguish a cold from allergies.
Black pepper acts as a chemical irritant on the nerves in the nasal mucosa, which causes sneezing.
Other chemical irritants that can cause sneezing include strong odors, perfumes,foods, and tobacco smoke.
These triggers causenon-allergic rhinitis, as there are no allergic antibodies behind the symptoms.
Physical irritants such as bright sunlight can also cause sneezing.
Sneezing is the end result.
Updated July 30, 2020.
Updated April 30, 2020.
Allan GM, Arroll B.Prevention and treatment of the common cold: making sense of the evidence.CMAJ.
2014;186(3):190-9. doi:10.1503/cmaj.121442
Cleveland Clinic.Nonallergic rhinitis.
Updated July 26, 2019.