Sayyiduna Abdullah bin Mas'ud (may Allah be pleased with him) narrates: A man came to the service of the Prophet (peace and blessings be upon him) and mentioned that he had kissed a woman. That man wanted to know the expiation for this from the Prophet (peace and blessings be upon him). So Allah Almighty revealed this verse: "Establish prayer at the two ends of the day and at some parts of the night. Indeed, good deeds erase bad deeds. This is a reminder for those who take heed." The narrator states: That man asked, "Is this command only for me?" The Prophet (peace and blessings be upon him) said: "This is for every person of my Ummah who acts upon it."
Hadith Referenceصحیح ابن حبان / كتاب الصلاة / 1729
Hadith Gradingفضيلة الشيخ الإمام محمد ناصر الدين الألبانيصحيح - انظر ما قبله.فضيلة الشيخ العلّامة شُعيب الأرناؤوطإسناده صحيح على شرط مسلم، محمد بن عبد الأعلى: من رجال مسلم، وباقي السند على شرطهما، معتمر: هو ابن سليمان بن طرخان التيمي، وأبو عثمان: هو النهدي عبد الرحمن بن مُلّ.