Sneezing as defined by Medical Encyclopedia is a sudden, forceful, uncontrolled burst of air through the nose and mouth. Sneezing can occur for a variety of reasons that have in common an irritation of the lining (mucous membranes) of the nose or throat. It is rarely a sign of a serious illness.
This sudden burst of air which is generally moist in substance and if one does not immediately cover one's nose and mouth, its moist vapours can fall on people around and this can be very embarrassing. However, the very act of sneezing is very rewarding for the overall health of the body as the discharge of this burst of air travelling at the speed of about 100 miles per hour is said to containing a million germs that exit of which necessary for cleansing of the body from bacteria and viruses.
Therefore one should be thankful to Allah for having us rid of harmful germs through act of sneezing. Since Islam is embodiment of etiquettes of various segments of our social life, Prophet Muhammad ﷺ has very specifically mentioned the response of a believer when he sneezes both when alone and in public. There is a Hadith in Sahi Bukhari number 6224 which is about sneezing:
The Prophet (ﷺ) said, " If anyone of you sneezes, he should say 'Al-Hamdu lil-lah الْحَمْدُ لِلَّهِ ' (Praise be to Allah), and his (Muslim) brother or companion should say to him, 'Yar-hamuka-l-lah يَرْحَمُكَ اللَّهُ ' (May Allah bestow his Mercy on you). When the latter says 'Yar-hamuka-llah", the former should say, 'Yahdikumul-lah wa Yuslih balakum يَهْدِيكُمُ اللَّهُ وَيُصْلِحُ بَالَكُمْ ". ' (May Allah give you guidance and improve your condition).
At another occasion, Abu Huraira has been quoted as saying (Sahi al Bokhari Volume 8, Book 73, Number 242):
The Prophet said, "Allah likes sneezing and dislikes yawning, so if someone sneezes and then praises Allah, then it is obligatory on every Muslim who heard him, to say: May Allah be merciful to you (Yar-hamuka-l-lah). But as regards yawning, it is from Satan, so one must try one's best to stop it, if one says 'Ha' when yawning, Satan will laugh at him."
It has also been narrated by Anas bin Malik (Sahi AL Bokhari Volume 8, Book 73, Number 240):
Two men sneezed before the Prophet. The Prophet said to one of them, "May Allah bestow His Mercy on you," but he did not say that to the other. On being asked (why), the Prophet said, "That one praised Allah (at the time of sneezing), while the other did not praise Allah."
By acting upon these hadiths, we not only thank Allah, but also induce a response by other believers around, for which we pray for them by saying "May Allah give you guidance and improve your condition." Needless to mention here that when one sneezes, he must cover his nose and mouth so that others around are saved of the moist air that follows the sneezing.