It is narrated from Sayyiduna Ibn Abbas (may Allah be pleased with them) that when he heard the sound of thunder, he would say: "Glory be to the One whose purity you have declared." He further said that thunder is an angel who shouts loudly to drive the clouds, just as a shepherd calls out loudly to drive his goats.
It is narrated from Sayyiduna Abdullah bin Zubair (may Allah be pleased with them both) that when he heard the sound of thunder, he would stop speaking and say: "Glory be to Him whom the thunder glorifies with His praise, and the angels (also glorify Him) out of fear of Him..." Then he would say: "This thunder is a severe warning for the people of the earth."
Hadith Referenceالادب المفرد / كتاب / 723
Hadith Gradingالألبانی:صحيح
Hadith Takhrij«صحيح : أخرجه أحمد فى الزهد : 1115 و ابن أبى شيبة : 29214 و ابن أبى الدنيا فى المطر : 97»