Ibn ‘Umar told that when the Prophet heard the sound of thunder and of thunderbolts he said, "O God, do not kill us with Thine anger and do not destroy us with Thy punishment, but preserve us before that happens."
Ahmad and Tirmidhi transmitted it, the latter saying that this is a gharib tradition.
‘A’isha said that when the Prophet saw something rising in the sky, meaning clouds, he left what he was doing, faced them and said, "O God, I seek refuge in Thee from the evil of what they contain." If God cleared them away he praised Him, and if rain fell he said, "O God, give a beneficial fall.”
Abu Dawud, Nasa’i, Ibn Majah and Shafi'i transmitted it, the wording being Shafi'i's.
It is told of ‘Abdallah b. az-Zubair that when he heard thunder he stopped talking and said, “Glory be to Him whose praise the thunder and the angels extol from fear of Him."
No wind ever blew without the Prophet getting down on his knees and saying, "O God, make it a blessing and do not make it a punishment. O God, make it to be winds and do not make it a single wind.” Ibn ‘Abbas remarked that the Book of God most high contains these words, "We sent upon them a furious wind;"1 "We sent upon them the devastating wind;"2 "And We sent the winds fertilising;"3 and "We sent the winds as heralds of glad tidings."4
1. Al-Qur’an; 41:16.
2. Al-Qur’an; 51:41.
3. Al-Qur’an; 15:22.
4. Cf. Al-Qur an; 30:46. The quotation is not quite accurate. The quotations are meant to show that when 'wind’ is used without qualification in the Qur’an it indicates punishment, but the use of 'winds without qualification indicates blessing.
Shafi'i and Baihaqi, in ad-da'awat al-kabir, transmitted it.