Surah Al-Baqara · سُوْرَةُ البَقَرَةِ · Juz 1
Q 2:51
وَإِذْ وَٰعَدْنَا مُوسَىٰٓ أَرْبَعِينَ لَيْلَةً ثُمَّ ٱتَّخَذْتُمُ ٱلْعِجْلَ مِنۢ بَعْدِهِۦ وَأَنتُمْ ظَـٰلِمُونَ
Translations
And [recall] when We made an appointment with Moses for forty nights. Then you took [for worship] the calf after him, while you were wrongdoers.Et [rappelez-vous] lorsque Nous donnâmes rendez-vous à Moïse pendant quarante nuits!... Puis en son absence vous avez pris le Veau pour idole alors que vous étiez injustes (à l'égard de vous-mêmes en adorant autre qu'Allah).Tafsir
Also, remember that the forty nights appointed to Moses were from the blessings of Allah, in which the revelation of the Torah, with its light and guidance, was completed. Yet you went and worshipped the calf during that period, which made you into wrongdoers.
Read Ibn Kathir (Ibn Kathir (abridged, English))
And (remember) when We appointed for Musa (Moses) forty nights, and (in his absence) you took the calf (for worship), and you were Zalimun (polytheists and wrongdoers)(51)Then after that We forgave you so that you might be grateful (52)And (remember) when We gave Musa the Scripture (the Tawrah)) and the criterion (of right and wrong) so that you may be guided aright (53)
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).
Arabic text: Tanzil (Uthmani). Translations: Sahih International (en), Muhammad Hamidullah (fr). tanzil.net