A Means of Forgiveness
As part of this infinite Mercy He made available for us various ways of achieving forgiveness and sin expiation. Among the most important and beneficial of these ways of forgiveness is fasting in general and in Ramadan in particular. Let us discover this glad tiding from the sweet words of the Messenger of Allah, salla Allahu alaihi wa sallam.
Abu Hurairah reported that the Prophet salla Allahu alaihi wa sallam said : "The time between the five prayers, two consecutive Friday Prayers, and two consecutive Ramadan are expiations for all that has happened during that period, provided that one has avoided the grave (major) sins." [Muslim]
Abu Huraira narrated that Allah's Messenger said : "Whoever observes fasts during the month of Ramadan out of sincere faith, and hoping to attain Allah's rewards, then all his past sins will be forgiven." [Bukhari]
"Whoever establishes prayers during the nights of Ramadan (and that is called Qiyam) faithfully out of sincere faith and hoping to attain Allah's rewards (not for showing off), all his past sins will be forgiven. [Bukhari]
Hudhaifah Ibn al-Yamaan reported that the Prophet, salla Allahu alaihi wa sallam, said: "The evils caused for a man through his family, wealth and neighbor are expiated by prayer, fasting and charity." [Bukhari and Muslim]. In another narration in Sahih al-Jami`: "The evils caused for a man through his family, his wealth, himself, his children and his neighbor are expiated by fasting, prayer, charity, enjoining the good and forbidding the bad.
Fasting is also a means of expiations for various sins
During Hajj, shaving the head while in a state of Ihraam, during Hajj [pilgrimage], for one who does that due to some illness. Or One who is unable to carry out the obligatory sacrifice in Hajj
"And complete the Hajj or 'umra in the service of Allah. But if you are prevented (From completing it), send an offering for sacrifice, such as you may find, and do not shave your heads until the offering reaches the place of sacrifice. And if any of you is ill, or has an ailment in his scalp, (Necessitating shaving), (He should) in compensation either fast, or feed the poor, or offer sacrifice; and when you are in peaceful conditions (again), if any one wishes to continue the 'umra on to the hajj, He must make an offering, such as he can afford, but if he cannot afford it, He should fast three days during the hajj and seven days on his return, Making ten days in all. This is for those whose household is not in (the precincts of) the Sacred Mosque. And fear Allah, and know that Allah Is strict in punishment." [al-Baqara, 2:196]
Hunting while in a state of Ihraam during Hajj
"O you who believe! Kill not game while in the sacred precincts or in pilgrim garb. If any of you do so intentionally, the compensation is an offering, brought to the Ka'ba, of a domestic animal equivalent to the one he killed, as adjudged by two just men among you; or by way of atonement, the feeding of the indigent; or its equivalent in fasts: that he may taste of the penalty of his deed. Allah forgives what is past: for repetition Allah will exact from him the penalty. For Allah is Exalted, and Lord of Retribution."[al-Ma'idah, 5:95]
Accidently killing a person from a people with whom you have a treaty
"Never should a believer kill a believer; but (If it so happens) by mistake, (Compensation is due): If one (so) kills a believer, it is ordained that he should free a believing slave, and pay compensation to the deceased's family, unless they remit it freely. If the deceased belonged to a people at war with you, and he was a believer, the freeing of a believing slave (Is enough). If he belonged to a people with whom you have treaty of Mutual alliance, compensation should be paid to his family, and a believing slave be freed. For those who find this beyond their means, (is prescribed) a fast for two months running: by way of repentance to Allah. for Allah hath all knowledge and all wisdom". [an-Nisaa', 4:92]
Violating an oath
"Allah will not call you to account for what is futile in your oaths, but He will call you to account for your deliberate oaths: for expiation, feed ten indigent persons, on a scale of the average for the food of your families; or clothe them; or give a slave his freedom. If that is beyond your means, fast for three days. That is the expiation for the oaths you have sworn. But keep to your oaths. Thus doth Allah make clear to you His signs, that you may be grateful." [al-Ma'idah, 5:89]
Dhihaar
The saying of a husband to his wife: You are to me like the back of my mother (i.e. unlawful to me).
"But those who divorce their wives by Zihar, then wish to go back on the words they uttered, (It is ordained that such a one) should free a slave before they touch each other: Thus are you admonished to perform: and Allah is well-acquainted with (all) that you do. And if any has not (the wherewithal), he should fast for two months consecutively before they touch each other. But if any is unable to do so, he should feed sixty indigent ones, this, that you may show your faith in Allah and His Messenger. Those are limits (set by) Allah. For those who reject (Him), there is a grievous Penalty". [al-Mujadilah, 58:3-4]