According to Chapter 2, Verse 185 of the Qur’an, the month of Ramadan in which the Qur’an was revealed, it’s necessary to prove that you are a true believer in the faith. To show this devotion, believers are instructed to fast at the sight of the first new moon of the month. This is not meant to punish believers but meant as a way to show faith and praise Allah for guiding believers and to show gratitude for all that he has done.
Fasting, however, is more than simply not eating all day. Fasting includes not drinking, not eating, no sexual relations from sunrise to sunset. Once the sun has set, all of these activities can be resumed.
The goal of this is to achieve what Muslims call taqwa or purification in the heart and mind, rejecting all things evil and accepting all elements of righteousness. Fasting is considered to be one of the highest degrees of obedience because the human is fighting off his animal instincts such as hunger and thirst, greed and NYC lust. He himself becomes more divine and one with God.
Some Muslims believe that they reach a higher spiritual plane and learn how to improve themselves ultimately improving society, while others, as they start to feel hunger and thirst, understand the plight of the less fortunate and look to improve society in that way.
Something interesting about the fact is that if people do not do it for the entire month, any days that they missed (for example, if they were pregnant or sick), can make them up by fasting before the next period of Ramadan. This is called qada’. As previously said, fasting is not about punishing the believers but a quest to achieve spiritual enlightenment and gratitude that Allah has provided this opportunity.