Allah (swt) says in the Qur’an:

“And whosoever does not rule by what Allah has revealed, such people are disbelievers (kafirun)” [TMQ 5:44]

“…such people are oppressors (zalimun)” [TMQ 5:45]

“…such people are deviators (fasiqun)” [TMQ 5:47]

Thus it is an obligation to judge/rule according to what Allah revealed, that is the Qur’an and the Sunnah.

Although the above verse (5:44) was revealed regarding some from the People of the Book, the general meaning is taken and so it applies to everyone. The well-known principle of interpretation is that consideration is given to the generality of the expression, not the specific occasion of revelation (al-‘ibrah bi ‘umum al-lafz, la bi khusus al-sabab).

Al-Qurtubi relates from Ibn ‘Abbas and Mujahid that they said regarding 5:44, “According to this the ayah is general.” [Abu ‘Abdullah Muhammad ibn Ahmad al-Qurtubi, Tafsīr al-Qurṭubī: The General Judgments of the Qur’an and Clarification of What it Contains of the Sunnah and Āyahs of Discrimination, Vol. 6, translated by Ustadha Aisha Bewley, Diwan Press, 2021, p. 156]

Ibn Kathir comments in his tafsir:

‘Al-Bara’ bin ‘Azib, Hudhayfah bin Al-Yaman, Ibn ‘Abbas, Abu Mijlaz, Abu Raja’ Al-‘Utaridi, ‘Ikrimah, ‘Ubaydullah bin ‘Abdullah, Al-Hasan Al-Basri and others said that this ayah was revealed about the People of the Book. Al-Hasan Al-Basri added that this ayah also applies to us. ‘Abdur-Razzaq said that al-Thawri said that Mansur said that Ibrahim said that these ayat, “Were revealed about the Children of Israel, and Allah accepted them for this Ummah.” Ibn Jarir [al-Tabari] recorded this statement …

‘Abdur-Razzaq said, “Ma‘mar narrated to us that Tawus said that Ibn ‘Abbas was asked about Allah’s statement,

And whosoever does not judge…”

He said, ‘It is an act of kufr.’ ” [Ibn Kathir, volume 3 pp. 187-188 of English translation]

[As for the expression ‘kufr duna kufr’, it is an interpolation. See here and here]

Al-Tabari relates that al-Suddi interpreted 5:44 as: “Whoever does not rule by what I revealed, so he left it intentionally, and trangressed whilst knowing, then he is from the disbelievers.” [Tafsir al-Tabari, 6/257]

Al-Tabari also narrates that Ibn ‘Abbas (r) said, “Whoever rejects what Allah has revealed, will have committed Kufr, and whoever accepts what Allah has revealed but did not rule by it, is a Zalim (unjust) and a Fasiq (rebellious) and a sinner.”

Allah says:

“Do they then seek the judgement of (the days of) ignorance? And who is better in judgement than Allah for a people who have firm faith?” [TMQ 5:50]

Ibn Kathir comments in his tafsir:

Allah criticizes those who ignore His commandments which include every type of righteous good thing and prohibit every type of evil, but they refer instead to opinions, desires and customs that people themselves invented, all of which have no basis in His dīn. During the time of Jahiliyyah, the people used to abide by the misguidance and ignorance that they invented by sheer opinion and lusts. The Tatar (Mongols) abided by the law that they inherited from their king Genghis Khan who wrote Al-Yasiq for them. This book contains some rulings that were derived from various religions, such as Judaism, Christianity and Islam. Many of these rulings were derived from his own opinion and desires. Later on, these rulings became the followed law among his children, preferring them to the Law of the Book of Allah and the Sunnah of His Messenger . Therefore, whoever does this, he is a disbeliever …
Allah said:
“Do they then seek the judgement of (the days of) ignorance?”
Meaning, they desire and want this and ignore Allah’s Judgement.

“And who is better in judgement than Allah for a people who have firm faith?”

Who is more just in decision than Allah for those who comprehend Allah’s Law, believe in Him, who are certain that Allah is the best among those who give decisions and that He is more merciful with His creation than the mother with her own child? Allah has perfect knowledge of everything, is able to do all things, and He is just in all matters. [Tafsir Ibn Kathir, vol. 3 p. 202 of the English translation]

Allah commands the following:

“If you differ in anything among yourselves, refer it to Allah and His Messenger, if you believe in Allah and the Last Day. That is better and more suitable for final determination.” [TMQ 4:59]

Ibn Kathir mentions regarding this verse in his tafsir:

‘Mujahid and several others among the Salaf said that the Ayah means, “(Refer) to the Book of Allah and the Sunnah of His Messenger.” This is a command from Allah that whatever areas the people dispute about, whether major or minor areas of the religion, they are required to refer to the Qur’an and Sunnah for judgment concerning these disputes…Allah’s statement:

“…if you believe in Allah and the Last Day”

indicates that those who do not refer to the Book and Sunnah for judgement in their disputes, are not believers in Allah or the Last Day.’

[Tafsir Ibn Kathir, vol. 2 pp. 498-499 of the English translation]