our respiratory tract is lined with mucous membranes and secrete mucus (often referred to as phlem) This is to protect foreign materials from entering and infecting the respiratory tract. If you are allergic to something (esp pollen) there will be excess mucus produced. As mucus is like water, the lungs tend not to want it in there so is moved up the respiratory tract and into the mouth thus expelled.
Sneezing is also response to get rid of the unwanted material.
Hope this helps