On the authority of Zayd ibn Khalid al-Juhaniyy (may Allah be pleased with him), who said: The Messenger of Allah (may the blessings and peace of Allah be upon him) led the morning prayer for us at al-Hudaybiyah following rainfall during the night. When the Prophet (may the blessings and peace of Allah be upon him) finished, he faced the people and said to them: Do you know what your Lord has said? They said: Allah and his Messenger know best. He said: This morning one of my servants became a believer in Me and one a disbeliever. As for him who said: We have been given rain by virtue of Allah and His mercy, that one is a believer in Me, a disbeliever in the stars (2); and as for him who said: We have been given rain by such-and-such a star, that one is a disbeliever in Me, a believer in the stars. (2) The pre-Islamic Arabs believed that rain was brought about by the movement of stars.
This Hadith draws attention to the fact that whatever be the direct cause of such natural phenomena as rain, it is Allah the Almighty who is the Disposer of all things. It was related by al-Bukhari (also by Malik and an-Nasa’i).