Aisha (may Allah be pleased with her) narrates that whenever the Prophet ﷺ saw clouds in the sky, he would leave all work, face the Qiblah, and supplicate: "O Allah! I seek refuge with You from the evil of what is in it." If the clouds dispersed, he would praise Allah, and if it rained, he would say: "O Allah, make this rain beneficial."
Hadith Referenceمسند الإمام الشافعي / كتاب العيدين والأضاحي والاستسقاء / 519
Hadith Takhrijصحيح من غير هذا الطريق : اخرجه ابوداود، الأدب، باب ما يقول اذا هاجت الريح (5099) ۔ والنسائي ، الاستسقاء، باب القول عند المطر (1524) وابن ماجة (3889)۔