Why did you not learn? Why did you not ask?
Shaykh Saaleh al-Fawzaan (حفظه الله) said:
وأما العلم الدنيوي فمن جهله فلا إثم عليه، ومن تعلمه فهو مباح له، وإذا نفع به الأمة فهو مأجور عليه ومثاب عليه، ولو مات الإنسان وهو يجهل هذا العلم لم يؤاخذ عليه يوم القيامة
لكن من مات وهو يجهل العلم الشرعي خصوصا العلم الضروري فإنه يسأل عنه يوم القيامة، لِمَ لَمْ تتعلم؟ لماذا لَمْ تسأل؟ الذي يقول إذا وضع في قبره: ربي الله والإسلام ديني ونبيي محمد – صلى الله عليه وسلم – هذا ينجو، يقال له: من أين حصَّلت هذا؟ يقول: قرأت كتاب الله وتعلمته.
أما الذي أعرض عن ذلك فإنه إذا سئل في قبره فإنه يقول: هاه هاه لا أدري، سمعت الناس يقولون شيئا فقلته، فهذا يؤجج عليه قبره نارا – والعياذ بالله – ويضيق عليه فيه حتى تختلف أضلاعه، ويصبح في حفرة من حفر النار؛ لأنه ما درى ولا تلا فيقال له: «لا دريت ولا تليت [أو لا تلوت]»
فهو لم يتعلم ولم يَقْتَدِ بأهل العلم، وإنما هو ضائع في حياته، فهذا الذي يؤول إلى الشقاء والعياذ بالله.
“As for worldly knowledge (such as knowledge of the industries, professions, mathematics, engineering etc), then, whoever is ignorant of it, then there is no sin upon him, and whoever learns it, then it is permissible for him, and if he utilizes to be benefit the Nation, then he is rewarded for it. If person died and he was ignorant of this knowledge, then he will not be taken account for it on the Day of Resurrection.
However, whoever died and he was ignorant of al-‘ilm ash-Shar’ee, (Knowledge of the Islamic system) particularly essential knowledge, then he will be asked about it on the Day of Resurrection: “Why did you not learn?” “Why did you not ask?”
The one who says, when he is placed in his grave: “My Lord is Allaah, Islam is my religion, and my Prophet is Muhammad (صلى الله عليه وسلم),” this person will be saved. It will be said to him: “Where did you acquire this from?” So he will say: “I read the Book of Allaah and I learned it.”
As for the person who turns away from that, then when he is questioned in his grave, he will say:
« هاه هاه لا أدري، سمعت الناس يقولون شيئا فقلته » (Haa-haa ! I do not know! I heard the people saying something, so I said it.)
This person’s grave will be made to blaze with fire upon him – and Allaah’s refuge is sought – and it will be crushed upon him, to such an extent that his ribs will cross over, and he will come to be pit from the pits of the Hell-Fire, because he did not have knowledge and he did not read. So it will be said to him: “You did not know, and you did not read (or you did not follow)” 
So he did not learn and he did not follow the example of the people of knowledge. Rather he was wasted and lost in his life, so this is the person who ends up in wretchedness, and Allaah’s refuge is sought.”
[Source: Sharh al-Usool ith-Thalaatha by Shaykh Saaleh al-Fawzaan, pages 19-20]
 Reported by al-Bukharee in abridged form as a hadeeth of Anas, (#1338). It is also reported by Muslim in abridged form as a hadeeth of Anas (#2870), and reported by Abu Dawood by al-Baraa’ bin ‘Aazib in a long hadeeth (#4753), declared Saheeh by Shaykh al-Albanee (رحمه الله)