Abdullah bin Abbas reported,

Rain fell upon the people during the time of the Prophet ﷺ, so the Prophet ﷺ said, "Some of the people have risen this morning grateful, and others ungrateful. Some said, 'This is the mercy of Allah,' while others said, 'The prediction of such-and-such star has come true.'"Then this verse was revealed, "So I swear by the setting of the stars" until it reached "and you make your provision that you deny [Him]" [Waqiah 56:75–82].

Azami 13492

Sahih

عن ابن عباس قال

مطر الناس على عهد النبي ﷺ، فقال النبي ﷺ: أصبح من الناس شاكر، ومنهم كافر، هذه رحمة الله، وقال بعضهم: لقد صدق نوء كذا وكذا فنزلت هذه الآية: {فلا أقسم بمواقع النجوم} حتي بلغ: {وتجعلون رزقكم أنكم تكذبون}.

الأعظمي 13492صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Tafsir of the great Quran
Chapter
Tafsir of Surah Waqiah
Section
His saying, "Then I swear by the setting of the stars, and indeed it is an oath, if you could know, that is great. Indeed it is a noble Quran, in a Register well-protected. None touch it except the purified. A revelation from the Lord of the worlds. Then is it to this statement that you are indifferent?"
Numbering
Jami al-Kamil 13492 (2nd edition)
Azami 13492