Sayyiduna Abu Umamah (may Allah be pleased with him) was heard narrating from the Prophet (peace and blessings be upon him) that he (peace and blessings be upon him) said: "The gates of the sky are opened and supplication is answered on four occasions: 1. when the ranks meet (in battle), 2. when the rain comes down, 3. when the prayer is established (iqamah), 4. when the Ka'bah is seen."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب صلاة الاستسقاء / 6460