The Children of Israel worshipped the Calf

Allah then said, "Remember My favor on you when I forgave you for worshipping the calf." This happened after Musa went to the meeting place with his Lord at the end of that period which was forty days. These forty days were mentioned in Surat Al-A`raf, when Allah said,

وَوَعَدْنَا مُوسَى ثَلَـثِينَ لَيْلَةً وَأَتْمَمْنَاهَا بِعَشْرٍ

(And We appointed for Musa thirty nights and added (to the period) ten (more)) (7:142).

It was said that these days were during the month of Dhul-Qa`dah plus the first ten days in Dhul-Hijjah, after the Children of Israel were delivered from Fir`awn and they safely crossed the sea. Allah's statement,

وَإِذْ ءَاتَيْنَا مُوسَى الْكِتَـبَ

(And (remember) when We gave Musa the Scripture) means, the Tawrah,

وَالْفُرْقَانِ

(And the criterion) that is that which differentiates between truth and falsehood, guidance and deviation.

لَعَلَّكُمْ تَهْتَدُونَ

(So that you may be guided aright), after escaping the sea, as another Ayah in Surat Al-A`raf clearly stated,

وَلَقَدْ ءَاتَيْنَا مُوسَى الْكِتَـبَ مِن بَعْدِ مَآ أَهْلَكْنَا الْقُرُونَ الاٍّولَى بَصَآئِرَ لِلنَّاسِ وَهُدًى وَرَحْمَةً لَّعَلَّهُمْ يَتَذَكَّرُونَ

(And indeed We gave Musa ـ after We had destroyed the generations of old ـ the Scripture (the Tawrah) as an enlightenment for mankind, and a guidance and a mercy, that they might remember (or receive admonition)) (28:43).