Sayyiduna Ibn Abbas (may Allah be pleased with them both) narrates: The people received rain in the time of the Messenger of Allah (peace and blessings be upon him), so the Prophet (peace and blessings be upon him) said: "Some of the people have entered the morning grateful and some of them ungrateful. (The grateful ones) said: This is a mercy from Allah which He has sent down; and some of them said: Such-and-such star has proved true." Thereupon this verse was revealed: "So I swear by the positions of the stars" [Surah al-Waqi'ah: 75] up to His words: "And you make your provision that you deny it" [Surah al-Waqi'ah: 82].
Hadith Referenceالمعجم الكبير للطبراني / باب العين / 12826