Whenever the Prophet ﷺ saw clouds rising on the horizon, he would stop what he was doing, even if he was in prayer, and say, "Allah, I seek refuge in You from any harm it may bring." If rain came, he would say, "Allah, make it a beneficial, pleasant downpour."
حدثنا ابن بشار حدثنا عبد الرحمن حدثنا سفيان عن المقدام بن شريح عن أبيه
أن النبي ﷺ كان إذا رأى ناشئا في أفق السماء ترك العمل وإن كان في صلاة ثم يقول اللهم إني أعوذ بك من شرها فإن مطر قال اللهم صيبا هنيئا
[Sahih] Reported by Nasai, Book of Rain Prayer, chapter on what to say when it rains, h: 1524, and Ibn Majah, h: 3889, from the hadith of Miqdam bin Shurayh, through this same route.