Hadith 1187
Abu Hurairah (May Allah be pleased with him) reported:
عن أبي هريرة رضي الله عنه، أن رسول الله صلى الله عليه وسلم قال: "من قام رمضان إيمانًا واحتسابًا غفر له ما تقدم من ذنبه" . ((متفق عليه)) .
The Messenger of Allah (ﷺ) said, "He who observes optional prayer (Tarawih prayers) throughout Ramadan, out of sincerity of Faith and in the hope of earning reward will have his past sins pardoned." [Al- Bukhari and Muslim].
In plain words
Praying the voluntary night prayer through Ramadan, with sincere faith and hope in Allah's reward, brings forgiveness of one's past sins.
Reference : Riyad as-Salihin 1187 In-book reference : Book 8, Hadith 197