Surah Al-Baqarah 2:183
يَـٰٓأَيُّهَا ٱلَّذِينَ ءَامَنُوا۟ كُتِبَ عَلَيْكُمُ ٱلصِّيَامُ كَمَا كُتِبَ عَلَى ٱلَّذِينَ مِن قَبْلِكُمْ لَعَلَّكُمْ تَتَّقُونَ
O you who have believed, decreed upon you is fasting as it was decreed upon those before you that you may become righteous -
Translation: Saheeh International
Tafsir
O you who believe prescribed for you obligatory for you is the Fast just as it was prescribed for those communities that were before you so that you might guard yourselves against acts of disobedience for it the fast curbs the desires that prompt these acts.
Excerpt from Tafsir al-Jalalayn, commentary on 2:183, via Quran.com. The reader has the full commentary and 9 more tafsirs.