On the authority of Mu’aawiyyah (radiAllahu ‘anhu) who said, the Messenger of Allah (sallAllaahu ‘alaihi wasallam) said,
He who Allah wants good for, He gives him understanding of the deen (religion).
[Hadeeth reported by Bukhaari and Muslim]
This hadeeth is one of the greatest (proofs of the) superiority of (beneficial) knowledge. In it is (the understanding) that beneficial knowledge is both a sign of happiness for the servant and a sign that Allah wants good for him.
Understanding of the religion encompasses the understanding of the fundamental principles of Emaan, the legislative matters and rulings of Islaam, as well as the realities of Ihsaan. This is because the Deen encompasses all three of these affairs. Like in the hadeeth of Jibreel when he (‘alaihis salaam) asked the Prophet (sallAllaahu ‘alaihi wasallam) about Emaan, Islaam and Ihsaan. He (sallAllaahu ‘alaihi wasallam) answered him by outlining each of them. He (sallAllaahu ‘alaihi wasallam) explained Emaan by (stating) its six principles (i.e. the six pillars of Emaan), and Islaam by (stating) its five principles (i.e. the five pillars of Islaam), and Ihsaan by his (sallAllaahu ‘alaihi wasallam's) statement,
To worship Allah as if you see Him and although you do not see him, know that He sees you
So entering into this is the servants understanding of ‘Aqeedah and knowing the way of the Salaf with regards to it, and (having both) an outward and inward conviction for it. As well as knowing the way of those (ignorant groups) who differed, went astray, and go against the way of the Salaf and knowing clearly their deviation from the Kitaab and Sunnah.
Fiqh (Islaamic Jurisprudence) is also entered into this; its fundamental principles (usool) and it subsidiary categories (faroo’a). Knowing the rulings with regards to the acts of worship, mutual dealings, crimes/punishments and other than this.
Also entering into it is the understanding of the realities of Emaan. The knowledge of how one behaves properly towards Allah in accordance with the Kitaab and Sunnah. Likewise, entering into it is the knowledge of every (science) that would aid him in understanding the religion. Like the science of the Arabic language and all of its branches.
So whoever Allah wants good for, He gives them understanding of these (previously mentioned) affairs and success in them. The understanding of the hadeeth also points to (the fact) that verily, Allah does not want good for the one who turns away from these sciences in totality. This is due to the individual’s denial of (these) means and ways of obtaining good and earning happiness.