Sahih Bukhari Volume 001, Book 012, Hadith Number 807.

Narated By Zaid bin Khalid Al-Juhani : The Prophet led us in the Fajr prayer at Hudaibiya after a rainy night. On completion of the prayer, he faced the people and said, "Do you know what your Lord has said (revealed)?" The people replied, "Allah and His Apostle know better." He said, "Allah has said, 'In this morning some of my slaves remained as true believers and some became non-believers; whoever said that the rain was due to the Blessings and the Mercy of Allah had belief in Me and he disbelieves in the stars, and whoever said that it rained because of a particular star had no belief in Me but believes in that star.'"

Related Hadith(s)