Ayesha reported,

The Prophet ﷺ, whenever he saw clouds approaching from any horizon, would leave whatever he was doing, even if he was in prayer, to face them. He would say, "O Allah, we seek refuge in You from the evil of what has been sent with these clouds."If it rained, he would say, "O Allah, make it a beneficial downpour," repeating this two or three times. And if Allah عز وجل dispersed the clouds without rain falling, he would praise Allah for that.

Azami 11271

Sahih

عن عائشة

أن النبي ﷺ كان إذا رأى سحابا مقبلا من أفق من الآفاق ترك ما هو فيه. وإن كان في صلاته حتى يستقبله: فيقول: اللهم إنا نعوذ بك من شر ما أرسل به فإن أمطر قال: اللهم سيبا نافعا مرتين أو ثلاثة-. وإن كشفه الله عز وجل ولم يمطر حمد الله على ذلك.

الأعظمي 11271صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Supplications, remembrances, and prayer upon the chosen Prophet ﷺ
Chapter
Supplications for various occasions
Section
What to say when seeing clouds
Numbering
Jami al-Kamil 11271 (2nd edition)
Azami 11271