They said...
They said, to be free from blame before your Lord and that happily they may guard (against evil)” (7:164) Imam said they were three groups among them, one was disobeying Allah and catching fish, a group prevented them from it and the third group remained silent.
Allah, the Exalted also said, “So when they neglected what they had been reminded of, we delivered those who forbade evil and we overtook those who were unjust with an evil chastisement.” “Therefore when they revoltingly persisted in what they had been forbidden, we said to them; Be (as) apes, despised and hated.
(7:165) Ten thousand people saw their condition that did not care of Allah’s chastisement, left them there, moved to another place, and settled there because they were afraid of chastisement. But at once the Divine chastisement came upon them and they became apes. All the gates of cities were closed no one could go out and no one can enter the city. When the people of other areas heard about it, they came and climbed the wall to see.
They saw all males and females were apes and moving around here and there. The people opened the gate and the people who prevented them from evil also entered along with them and asking them whether they were their relatives. But the apes cried and answered them by nodding their heads, “Yes, we are your relatives.” They lived for three days only and Allah sent a heavy rainfall and they all were drowned. From that day Allah, the creator created apes that we see today.
Imam Zayn al-‘abidin said, “This happened due to fish that they all turned into apes, but what will happen to those who killed the grandson and progeny of the Prophet ? Allah has not punished them in the world but a severe chastisement is prepared for the day of judgment. If they had obeyed Allah and His orders for not catching fish on Saturday, they would not have been punished.
The people who advised them to prevent from wrath should have also prayed to Allah and He would have accepted their prayer. But they advised them only, and not prayed to Allah and they all became apes. Because Allah has written this in the Protected Tablet.” Imam Ja‘far as-Sadiq has stated that Allah ordered the Jews to leave the worldly matters on Friday, but they did not obey His orders. Instead of Friday, they sanctified Saturday. Due to this Allah prohibited them to catch fish on Saturday.
According to another tradition, it is stated that Allah has transmuted a group of The Israelites which vanished into the sea.