It's a very interesting phenomenon called photic sneeze reflex,namely if you stay at a gloomy environment and turn to another field with strong light,your nose will feel tickled and sneeze.A sneeze is usually triggered by an irritation in the nose, which is sensed by the trigeminal nerve, a cranial nerve responsible for facial sensation and motor control. This nerve is in close proximity to the optic nerve, which senses a sudden flood of light entering the retina.Then you get a sneeze.So this is the reason of getting a sneeze when you stare at the sun.
When you look at the sun, the warm sunshine will make your nose and eye nerves stimulating. The eye nerves get reaction and gets to the nose nerves which they are interlinked. However, you should care about the eye healthy problems. You should check whether they get the inflammation which will be so reacted so strongly under the sunshine.
This kind of knee-jerk sneezing is not common. About 25% people will sneeze when looking at the Sun or other bright lights. There are several theories to explain why people will sneeze when looking at the Sun. One is that those people whose cranial nerve (responsible for sneezing) is connected to optic nerve (for Visual) will respond/sneeze because of hyper-stimulation of the optic nerve. Another explanation is that the facial nerves are stimulated by sunlight, which triggers nasal mucosa, leading to sneezing. Till now, there is no conclusion on why this happens. Luckily, this symptom will not cause any other health problems.
Well, in some cases, it can be normal for many people. So you should know that it is not just your own problem. As we know that the experts call it as the photic sneeze reflex. And according to some researches, about 20% of the population has this kind of symptom. Generally speaking, when you look at a bright light after coming out of a dark room and you have this irresistible urge to start sneezing. And at the same, it happens to sun too. as we know that when you look at the sun, your pupil closes up and it gets much smaller in order to stop as much light getting into your eye. But on the other hand, sometimes this can get a bit muddled up with the bit of the brain that thinks that your nose must be irritating. At this moment, it leads to a sneeze instead. So maybe you should not stare at the sun by using your naked eyes, and wearing sunglasses with UV protected is also important.