Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
suyuti:4820a

that the Messenger of Allah ﷺ said: "Indeed Allah, the Blessed and Exalted, created His creation in darkness, then He cast His Light upon them, so whoever is touched by that light he is guided, and whoever is not, he goes astray. It is for this reason that I say that the pens have dried with Allah's knowledge." (Using translation from Tirmidhī 2642)   

السيوطي:٤٨٢٠a

"إِنَّ الله تَعَالى خَلَق خَلقَهُ فِي ظُلمَة ثُمَّ أَلْقَى علَيهِم مِنْ نُورِهِ، فَمَن أَصَابَهُ مِنْ ذَلكِ النُّورِ اهْتَدَى، وَمَنْ أَخْطَأَهُ ضَلَّ فلِذلك أَقُولُ: جَفَّ القَلَمُ علَى عِلمِ الله".

حم، ت حسن، وابن جرير، طب، ك، ق عن ابن عمرو - ؓ -.  

(وفي رواية "خَلَق خلقَهَ ثُمَّ جَعلهُم فِي ظُلمَةٍ ثُمَّ أخَذ مِن نُورِهِ مَا شَاءَ فَأَلْقَاهُ علَيهِمْ فَأَصَابَ النُّورُ مَن شَاءَ أن يُصيِبَهُ، وأَخْطَأَ من شَاءَ، فَلذَلِكَ أَقول: جف القلم بما هو كائن" رَواه الإِمام أحمد بإِسنادين أحدهما رجاله ثقات)

See similar narrations below:

Collected by Tirmidhī, Ibn Ḥibbān
tirmidhi:2642al-Ḥasan b. ʿArafah > Ismāʿīl b. ʿAyyāsh > Yaḥyá b. Abū ʿAmr al-Saybānī > ʿAbdullāh b. al-Daylamī > ʿAbdullāh b. ʿAmr

that the Messenger of Allah ﷺ said: "Indeed Allah, the Blessed and Exalted, created His creation in darkness, then He cast His Light upon them, so whoever is touched by that light he is guided, and whoever is not, he goes astray. It is for this reason that I say that the pens have dried with Allah's knowledge."  

Abū ʿĪsá said that this Ḥadīth is Ḥasan.
الترمذي:٢٦٤٢حَدَّثَنَا الْحَسَنُ بْنُ عَرَفَةَ حَدَّثَنَا إِسْمَاعِيلُ بْنُ عَيَّاشٍ عَنْ يَحْيَى بْنِ أَبِي عَمْرٍو السَّيْبَانِيِّ عَنْ عَبْدِ اللَّهِ بْنِ الدَّيْلَمِيِّ قَالَ سَمِعْتُ عَبْدَ اللَّهِ بْنَ عَمْرٍو يَقُولُ

سَمِعْتُ رَسُولَ اللَّهِ ﷺ يَقُولُ إِنَّ اللَّهَ ﷻ خَلَقَ خَلْقَهُ فِي ظُلْمَةٍ فَأَلْقَى عَلَيْهِمْ مِنْ نُورِهِ فَمَنْ أَصَابَهُ مِنْ ذَلِكَ النُّورِ اهْتَدَى وَمَنْ أَخْطَأَهُ ضَلَّ فَلِذَلِكَ أَقُولُ جَفَّ الْقَلَمُ عَلَى عِلْمِ اللَّهِ  

قَالَ أَبُو عِيسَى هَذَا حَدِيثٌ حَسَنٌ

ذِكْرُ إِلْقَاءِ اللَّهِ جَلَّ وَعَلَا النُّورَ عَلَى مَنْ شَاءَ مِنْ خَلْقِهِ هِدَايَتَهُ

ibnhibban:6169Aḥmad b. ʿAlī b. al-Muthanná > al-ʿAbbās b. al-Walīd al-Narsī > Ibn al-Mubārak > al-Awzāʿī > Rabīʿah b. Yazīd > ʿAbdullāh b. al-Daylamī

that the Messenger of Allah ﷺ said: "Indeed Allah, the Blessed and Exalted, created His creation in darkness, then He cast His Light upon them, so whoever is touched by that light he is guided, and whoever is not, he goes astray. It is for this reason that I say that the pens have dried with Allah's knowledge." (Using translation from Tirmidhī 2642)  

ابن حبّان:٦١٦٩أَخْبَرَنَا أَحْمَدُ بْنُ عَلِيِّ بْنِ الْمُثَنَّى حَدَّثَنَا الْعَبَّاسُ بْنُ الْوَلِيدِ النَّرْسِيُّ حَدَّثَنَا ابْنُ الْمُبَارَكِ عَنِ الْأَوْزَاعِيِّ عَنْ رَبِيعَةَ بْنِ يَزِيدَ عَنْ عَبْدِ اللَّهِ بْنِ الدَّيْلَمِيِّ قَالَ دَخَلْتُ عَلَى عَبْدِ اللَّهِ بْنِ عُمَرَ فَقُلْتُ إِنَّهُمْ يَزْعُمُونَ أَنَّكَ تَقُولُ الشَّقِيُّ مَنْ شَقِيَ فِي بَطْنِ أُمِّهِ فَقَالَ لَا أُحِلُّ لِأَحَدٍ يَكْذِبُ عَلَيَّ

سَمِعْتُ رَسُولَ اللَّهِ ﷺ يَقُولُ «إِنَّ اللَّهَ خَلَقَ خَلْقَهُ فِي ظُلْمَةٍ وَأَلْقَى عَلَيْهِمْ مِنْ نُورِهِ فَمَنْ أَصَابَهُ مِنْ ذَلِكَ النُّورِ اهْتَدَى وَمَنْ أَخْطَأَ ضَلَّ» فَلِذَلِكَ أَقُولُ جَفَّ الْقَلَمُ عَنْ عِلْمِ اللَّهِ جَلَّ وَعَلَا