(So turn in repentance to your Creator and kill yourselves (the guilty), that will be better for you before your Creator." Then He accepted your repentance. Truly, He is the One Who accepts repentance, the Most Merciful.) 2:54 As for the humiliation mentioned in the Ayah, it pertains to the disgrace and humiliation that the Jews suffered in the life of this world. Allah's statement,
وَكَذَلِكَ نَجْزِى الْمُفْتَرِينَ
(Thus do We recompense those who invent lies) is for all those who invent an innovation (in religion). Surely, the disgrace resulting from inventing an innovation (in religion) and defying Allah's Message, will be placed in the heart and from there on to the shoulders. Al-Hasan Al-Basri said; "The disgrace of innovation will weigh on their shoulders even if they were to gallop on their mules or trot on their work horses." Ayyub As-Sakhtiyani narrated from Abu Qilabah Al-Jarmi that he commented on this Ayah,
The verse 153 speaks of the people who repented to Allah for their sin after the admonitions of their Prophet, and fulfilled the formidable condition of killing each other for their forgiveness. They killed each other as was stipulated in the command of Allah for their forgiveness by Allah. The Prophet Musa (علیہ السلام) called them to him and informed them that Allah had accepted their repentance. The people killed in this combat were awarded martyrdom while those who survived were forgiven by Allah. This implies that those who get themselves involved in sinful acts, if repent to Allah and correct their belief, Allah forgives them in His mercy with no regard to the gravity of the act. It is, therefore wise to turn to Allah in repentance instantly after every sinful act.'
Tazkirul Quran
Maulana Wahiduddin Khan
This action of the Israelites has been called false representation (iftira). Why was it so called? The reason is that they had committed this wrongful act in the name of Truth. Their case was not of the rejection of truth but of the exploition of Truth in order to gain material benefits. They used to justify such acts in religious terms. Like the polytheists, they said that God had become incarnate in the form of the idol they had made themselves, so they believed that worshipping it was as good as worshipping God. Moreover, Samiri also fabricated a dream, saying that in it he had seen Gabriel and collected a handful of earth from the footprint of his horse and put it in the statue of the calf, which caused a sound to come from its mouth. Samiri and his companions fabricated falsehoods and attributed them to God. Such action amounted to the making of false allegations (iftira) about God. When the People of the Book indulge in such irreligious acts in the name of religion, they incur the wrath of God. Such people are punished not only in the Hereafter but also in this life. As for the Israelites, Moses instructed the leaders of each tribe to find out those who were initially responsible for this wrongdoing. The guilty were thus caught and put to death by their own tribesmen. Only those who, greatly ashamed of their actions, admitted their guilt and sincerely repented, were not punished. The Israelites were punished for their wrongdoing by their own people. However, such punishment is sometimes meted out by other people or communities, especially when they can also inflict humiliation or ignominy. Being truly ashamed of sin is the real essence of repentance (tawbah). This strong feeling of shame is a guarantee that the individual resolves in the innermost recesses of his heart that he will never indulge in such an act in future. When a sinner displays this feeling of shame and proves his determination never to repeat the act in question, it is as if he has embraced the faith afresh. After a period of backsliding, he re-enters the fold of God’s religion.
Uthmani text of the Madinah mushaf (King Fahd Complex). Translation: Saheeh International. Tafsir via Quran.com.