Time for Repentance (tawbah)
The Prophet Muhammad once said:
"Allah extends His Hand at night so that He can forgive the sinner of the day; He extends His Hand in the day so that He can forgive the sinner of the night. He will continue to do so until the sun rises from the West (the Day of Judgment)"
In another Hadith the Prophet said, "Allah accepts the Repentance (Tawbah) of His servant as long as he does not croak (on his death bed)" )"
i.e. until just before his last moment, when he knows that he has to repent any way.
Once he advised his Companions: "People! Repent towards Allah and ask Him to forgive you. For I repent a hundred times a day!" [Muslim]
Imam Raghib al-Isfihani mentions the following three benefits of a sincere Tawbah (repentance) in Adh-Dhari'ah:
It patches up your faults and identifies the devil's points of entry to the human heart. This makes the repenting person more aware of evil around him or her.
You, the repenting person, become embarrassed and are thus overcome with fear. You approach the door of your Merciful Lord with humbleness and apprehension.
Since you have experienced both the good and bad aspects of this life, and have tasted its sweet and bitter fruits, you become more sympathetic towards other sinners, and do not look down upon them.