Prayer for rain (salat al-’istisqa’) has been expressly mentioned in the Qur’an and the Sunnah, and there is consensus concerning it. God Almighty says:
وَإِذْ اسْتَسْقَى مُوسَى لِقَوْمِهِ...
When Moses prayed for water for his people,... (Qur’an 2:60)
فَقُلْتُ اسْتَغْفِرُوا رَبَّكُمْ إِنَّهُ كَانَ غَفَّاراً * يُرْسِلْ السَّمَاءَ عَلَيْكُمْ مِدْرَاراً
And I said: ‘Ask forgiveness of your Lord; surely He is ever All-forgiving, and He will loose heaven upon you in torrents. (Qur’an 71:10-11)
A tradition reports that once when the people of Madinah were facing drought and the Prophet (S) was delivering a sermon, a man stood up and said: "Horses and women have perished. Pray to God to give us rain.”The Prophet (S) extended his hands and prayed.
Anas narrates: "The sky was (clear) like a piece of glass. Then the wind began to blow. The clouds emerged and gathered and the sky poured forth its blessings. We went forth wading through the pools till we reached our homes. It continued to rain till the next Friday, and the same person stood up again and said: ‘O Prophet of Allah, houses have fallen and the caravans have been detained. So pray to God to stop it’. The Prophet (S) smiled and then said: ‘O God, make rain around us, not upon us.’ Then I looked at the sky and saw it (i.e. the clouds) split and form a garland around Madinah."
The occasion for this salat is drought, scanty rainfall, and drying up of springs. The schools concur that if rain is delayed even after performing the salat, it is mustahabb to repeat it. If it is preceded by three days of fasting and the people go forth on foot, in a humble and supplicating manner, accompanied by their women and children, their elderly, men and women, and cattle, it will be more conducive for invoking Divine mercy.
There is consensus that it is valid to perform it individually as well as in jama’ah, and that it does not have an adhan and iqamah; it is mustahabb for the imam to deliver a sermon after the salat. As to its mode, the schools concur that it comprises two rak’ahs to be performed like the two rak’ahs of salat al-‘id in accordance with what each school specifies in that regard. The Malikis and the Hanafis say: It is like salat al-‘Id though without the additional takbirat.
The Imamis observe: It is mustahabb after every takbirah to recite qunut imploring the mercy and blessing of God and seeking rainfall.
The four Sunni schools state: This kind of supplication will be mentioned by the preacher after the salat during the sermon, not in the salat itself.