Narrated It is reported by Salim bin Abdullah on the authority of his father (Abdullah bin Umar (ra)) that when the prophet (ﷺ) heard a thunder-clap or a thunder-bolt, he would make this supplication:
“O Allah, slay us not with your lightening and destroy us not with your punishment. But, preserve us before that.”
Narrated Abdullah bin al-Zubayr (ra) stopped speaking when he heard a thunder-clap and said:
“Glory be to him whose praise the thunderclap sings and the angels glorify in awe of him”. He used to say, then, that the thunder-clap is a stern warning for the dwellers of earth.
It is stated by sayidina Abu Hurayrah (ra) that the Messenger of Allah (ﷺ) said "Wind is the mercy of Allah. It brings mercy or punishment. Do not denounce it but ask Allah, the exalted, for the good of it and seek the protection of Allah from its evil.”