The religion of Islam is based on five fundamental pillars, Tauheed (belief in the oneness of Allah SWT), Salat (prayer), Sawm (fasting), Zakat, and Hajj. Humans are susceptible to sins. Therefore, the boundaries set by Islam and fasting teach one to refrain from all sinful acts and follow the Sunnah of Prophet Muhammad (PBUH) to live a good life.
Abu Umamah (RA) said: “I said: O Messenger (PBUH) of Allah SWT, ‘which deed is best?’ He (PBUH) said: ‘Take to fasting, for there is nothing equal to it.'” (An-Nasai: 2224)
Abu Hurairah (RA) narrated that Prophet Muhammad (PBUH) said: “Worship Allah, and worship none along with Him, offer the (five) prescribed compulsory prayers perfectly, pay the compulsory Zakat, and fast the month of Ramadan.”
Prophet Muhammad (PBUH) said, “Allah said, ‘All the deeds of Adam’s sons (people) are for them, except fasting which is for Me, and I will give the reward for it’…There are two pleasures for the fasting person, one at the time of breaking his fast, and the other at the time when he will meet his Lord; then he will be pleased because of his fasting.'” (Sahih Bukhari: 1904)