'Photic sneeze reflex' is the term used often for the condition you mentioned that is sneezing when you face the sun. When a bright light is focused on your eye your pupils contract, this reflex occurs when the light in the eye sends nerve signals to the brain and back to the eye again leaving signals for the pupil to contract. A sneeze reflex occurs when some tickling (by bacteria or virus) occurs in the nose sends signals to brain from the nose and back to the nose, mouth and chest muscles and other organs that are involved in actual sneeze. Normally the routs for papillary light reflex and sneeze reflex are different, but what happens in case of 'sun sneezers' is little different. The bright light not only sends signals to the eyes from the brain but also to the nose, mouth, chest and other organs. Thus sun light accidentally activates two different activities or outgoing pathways leading to constricting of the pupil and sneezing at the same time.
answered by Dr S