Imam Al-Nawawi’s Riyad-us-Saliheen
Prohibition of Attributing Rain to the Stars
1731. Zaid bin Khalid (May Allah be pleased with him) said: The Messenger of Allah (sallallaahu alayhi wa sallam) led the Fajr prayer at Al-Hudaibiyyah after a rainfall during the night. At the conclusion of prayer, he turned towards the people and said, “Do you know what your Rubb has said?” They replied: “Allah and His Messenger know better.” Upon this he remarked, “He has said: `Some of My slaves have entered the morning as My believers and some as unbelievers. He who said: We have had a rainfall due to the Grace and Mercy of Allah, believes in Me and disbelieves in the stars; and he who said: We have had a rainfall due to the rising of such and such star, disbelieves in Me and affirms his faith in the stars.”’
[Al-Bukhari and Muslim].