Observing the five daily prayers and Friday prayers, and performing prayers with presence of heart:


After faith, the most important act in Islam is performing the five daily obligatory prayers. The virtue and benefits of prayer are mentioned countless times in the Quran and Hadith, and one of these benefits is that sins are forgiven through the blessing of prayer. Allah Almighty says: "Wa aqim al-salata tarafi al-nahari wa zulafan min al-laili inna al-hasanati yudhhibna al-sayyiati dhalika dhikra lil-dhakirin" (Hud: 114)


“And establish prayer at the two ends of the day and in the first hours of the night. Indeed, good deeds do away with misdeeds. That is a reminder for those who remember." 


Some commentators say that the two ends refer to the Fajr (dawn) and Maghrib (sunset) prayers, and the parts of the night refer to the Isha (night) prayer. Performing prayers at these times is somewhat difficult, so it is specifically mentioned.


Other commentators interpret the two ends to mean Zuhr (noon) and Asr (afternoon) prayers, and the parts of the night to mean Fajr, Maghrib, and Isha prayers. In this case, the proof of performing all five prayers is found in this verse. 


 Allah Almighty has promised in this noble verse to erase sins from the record of deeds based on the commitment to perform obligatory prayers, that through the blessing of prayer, Allah Almighty erases sins and writes good deeds, just as medicines give strength and power to a person and eliminate the effect of disease, similarly, good deeds also bring reward and eliminate the effect of sin.


This verse was revealed under a specific incident. It is narrated from Hazrat Abdullah bin Masood (RA) that a man kissed a strange woman, but immediately realized his mistake. He came to the service of the Holy Prophet (PBUH) and confessed his mistake, and inquired about the way to atone for his fault from the Messenger of Allah (PBUH). At that time, this verse was revealed, which stated to commit to the five daily obligatory prayers, and sins will be forgiven through the blessing of these good deeds. The person inquired from the Prophet (PBUH) whether this atonement for sin was specific to him? The Prophet (peace and blessings of Allah be upon him) replied that no, the command is general.


The effect of prayer in erasing sins is also mentioned in the hadiths.


It is narrated from Hazrat Abu Hurairah (RA) that the Holy Prophet (PBUH) said 


 Ara'aytum law anna nahran bibabi ahadikum yaghtasil fihi kullu yawmin khamsa marratin, hal yabqa min daranih shai', qalu la yabqa min daranih shai', qala fa dhalika mathalu al-salawati al-khamsi yamhu Allahu bihin al-khataya ( رواہ البخاری 528)

Tell me! If a river were flowing at the door of one of you in which he bathes five times a day, would any dirt remain on his body? The Companions replied that nothing would remain. The Prophet (PBUH) said! This is exactly the example of the five prayers, Allah Almighty washes away and erases sins through them.


The one who prays is as if diving into an ocean of light. Just as no dirt remains on the body after bathing five times a day, similarly, after performing the five obligatory prayers, his soul is washed and purified by the waves of light, and sins are erased from his record of deeds, provided that he has prayed with sincerity.