Importance of Fasting in the light Quran and Hadith:
“O ye who believe! Fasting is prescribed to you as it was prescribed to those before you, that ye may (learn) self-restraint.” 2:183
“(Fasting) for a fixed number of days; but if any of you is ill, or on a journey, the prescribed number (should be made up) from days later. For those who can do it (with hardship), is a ransom, the feeding of one that is indigent. But he that will give more, of his own free will, it is better for him. And it is better for you that ye fast, if ye only knew.” 2:184
Also, Allah Almighty said while referring to fasting,
"And when My slaves ask you (O Mohammad) concerning Me, then answer them, I am indeed near (to them by My Knowledge). I respond to the invocations of the supplicant when he calls on Me (without any mediator or intercessor)." [2:186].
Types of Fasting
Fasting in Islam is a highly developed institution, and needs to be studied in depth. There are two types of injunctions with regards to fasting. One relates to obligatory fasting and the other to optional fasting.
1. Obligatory Fasting
There is one full month in every year in which fasting is prescribed for Muslims all over the world. As the month is a lunar month, so it keeps changing around the year in relation to the solar months. This creates a universal balance for the worshippers. Sometimes the fasting in winter months is easy as far as the days go, in comparison to the long winter nights, while during the summer months the days become long and exacting. As the lunar months keep rotating around the year, so Muslims in all parts of the world have some periods of easy fasting and some of arduous fasting.
2. Optional Fasting
The optional fasting is so well promoted that it becomes a part of the righteous Muslim's way of life. Although a majority of Muslims do not go beyond the month of obligatory fasting, some keep fasts now and then particularly when in trouble. As it is expected that the prayers offered in fasting are more productive, some people keep extra fasts to ward off their problems, but some do it only for the sake of winning Allah's special favors. There no limit to this, except that the founder of Islam strongly discouraged those who had vowed to fast
continuously for their whole life. When the Holy Prophet (SAW) came to learn of one such case, he disapproved of the practice and censured the man for attempting to achieve liberation as if by forcing his will upon. He told the person concerned that: 'Just by putting yourself to trouble or discomfort, not only will you be unable to please God, but you may even earn His displeasure.' He pointed out that over emphasis on austerity is likely to make one negligent towards one's wife and children, kith and kin, friends etc.