Abdullah bin Amr bin As reported,

I heard the Messenger of Allah ﷺ say, "Allah عز وجل created His creation in darkness, then cast upon them some of His light. Whoever was touched by that light was guided, and whoever missed it went astray. That is why I say, the pen has dried upon what Allah عز وجل knows."

Azami 12885

Hasan

عن عبد الله بن عمرو قال

سمعت رسول الله ﷺ يقول: إن الله عز وجل خلق خلقه في ظلمة، فألقى عليهم من نوره، فمن أصابه من ذلك النور اهتدى، ومن أخطأه ضل. فلذلك أقول: جف القلم على علم الله عز وجل.

الأعظمي 12885حسن
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Tafsir of the great Quran
Chapter
Tafsir of Surah Nur
Section
His saying, "Allah is the Light of the heavens and the earth. The example of His light is like a niche within which is a lamp, the lamp is within glass, the glass as if it were a pearly star lit from a blessed olive tree, neither of the east nor of the west, whose oil would almost glow even if untouched by fire. Light upon light. Allah guides to His light whom He wills. And Allah presents examples for the people."
Numbering
Jami al-Kamil 12885 (2nd edition)
Azami 12885