In ayah 78, we learn about the sad ending of the Bani Israel.
لُعِنَ الَّذِينَ كَفَرُواْ مِن بَنِى إِسْرَءِيلَ عَلَى لِسَانِ دَاوُودَ وَعِيسَى ابْنِ مَرْيَمَ ذلِكَ بِمَا عَصَوْا وَّكَانُواْ يَعْتَدُونَ
Those among the Children of Israel who disbelieved were cursed by the tongue of Dawud and Eesa, son of Maryam. That was because they disobeyed (Allah and the Messengers) and were ever transgressing beyond the bounds.
Due to their transgression and going to extremes in religion they were cursed by Prophet Dawud aalyhi salaam and Prophet Eesa aalyhi salaam.
When Dawud aalyhi salaam prayed against them they were transformed into swines. Then Eesa aalyhi salaam cursed them and they were transformed into monkeys. Some commentators have pointed out that the reference to the curse mentioned here as coming through only two prophets is because the context so requires. But, the fact is that their cursing began from by Musa aalyhi salaam and ended at the Last Messenger, salAllahu aalyhi wa sallam.
Thus, the curse which overtook those who were hostile to prophets or were guilty of acting excessively by making prophets sharers in Divine attributes was wished verbally by four prophets one after the other.
– Allah subhanahu wa ta’ala doesn’t punish for no reason.
– Bani Israel were cursed by two noble messengers, Dawud aalyhi salaam and Eesa aalyhi salaam.
– When a person habitually disobeys Allah subhanahu wa ta’ala or transgresses the limits then he faces severe punishment.