(21) باب مَا يَدْعُو بِهِ الرَّجُلُ إِذَا رَأَى السَّحَابَ وَالْمَطَرَ
'Aishah narrated that when the Prophet (ﷺ) saw a cloud approaching from any horizon, he would stop what he was doing, even if he was praying, and turn to face it, then he would say:
"Allahumma inna na'udhu bika min sharri ma ursila bihi (O Allah, we seek refuge with You from the evil of that with which it is sent)." Then if it rained he would say: "Allahumma sayyiban nafi'an (O Allah, a beneficial rain)," two or three times. And if Allah dispelled it and it did not rain, he would praise Allah for that.
Reference: Sunan Ibn Majah 3889
In-book reference: Book 34, Hadith 63
English translation: Vol. 5, Book 34, Hadith 3889