Ubad bin Tamim reported that his uncle informed him that the Prophet Muhammad (peace be upon him) went out with the people to the Eid ground to pray for rain. He stood and supplicated to Allah, then turned towards the Qiblah and turned his cloak inside out (his supplication was accepted), and it rained.
Hadith Referenceسنن دارمي / من كتاب الصللاة / 1573
Hadith Takhrijاس حدیث کی سند صحیح ہے۔ دیکھئے: [بخاري 1023]
Brief Explanation
(Explanation of Hadiths 1571 to 1573)
Supplicating for rain during times of drought is among the Sunnahs of the Messenger of Allah sallallahu alayhi wa sallam, and there are several methods for this: (1) At any time, anyone may supplicate to Allah Ta'ala for rain; (2) The imam may supplicate during voluntary (nafl) or obligatory (fard) prayer or during the sermon (khutbah); (3) The most complete form is that the imam takes the people to the Eid ground, leads them in a two-unit (rak‘ah) audible prayer, which is called Salat al-Istisqa (the prayer for rain), delivers a sermon, then supplicates for rain and turns his cloak inside out. Repentance (tawbah) and seeking forgiveness (istighfar) before the prayer, as well as giving charity (sadaqah) and alms, are also among the means for the acceptance of supplication.
The evidence for all these matters is found in authentic hadiths, some of which Imam Darimi rahimahullah has mentioned here.