Assalamualaikum ustaz. Can you explain the methodology of performing sunnah repentance prayer?
Alhamdulillah, praise and gratitude to Allah SWT for His countless blessings for us all. Praise and salutations to our beloved Prophet Muhammad PBUH, his family, companions and all those who follow his footsteps until the Last Day.
According to Kamus Dewan, repentance is regret for the sin (bad deeds and others) and is determined to never sin (do the bad deed) again, anxiety (regret) for having made a mistake and is determined to never repeat it again. It also means returning to God (by leaving the act – and other – that is prohibited and doing what is commanded). (See 4th Edition of Kamus Dewan) 
Repentance means returning to Allah, truly coming back to Him. It also means leaving the sin. Whereas, istitabah means asking a person to repent.  According to Ibn Manzur, repentance is returning to Allah from sin, or returning to obedience after sinning, or means returning from sin. 
While the terminology, repentance is just like regret that is followed by determination and resolve (to leave the sin) as well as regret that is followed by knowledge and realization that the sins are the barrier between the person and his lover. 
Repenting from sin is wajib (obligatory). Allah SWT states:
وَتُوبُوا إِلَى اللَّـهِ جَمِيعًا أَيُّهَ الْمُؤْمِنُونَ لَعَلَّكُمْ تُفْلِحُونَ
“And turn to Allah in repentance, all of you, O believers, that you might succeed.” 
Ibn Kathir said: Which means doing what has been commanded for you from the beautiful and commendable attributes. Leave what is the usual of the Jahiliyyah who have unsatisfactory character, for success can only be attained by doing what is commanded by Allah and His Messenger and leaving all that has been prohibited by Allah and His Messenger. 
Allah SWT also states:
وَأَنِ اسْتَغْفِرُوا رَبَّكُمْ ثُمَّ تُوبُوا إِلَيْهِ يُمَتِّعْكُم مَّتَاعًا حَسَنًا إِلَىٰ أَجَلٍ مُّسَمًّى وَيُؤْتِ كُلَّ ذِي فَضْلٍ فَضْلَهُ
“And [saying], “Seek forgiveness of your Lord and repent to Him, [and] He will let you enjoy a good provision for a specified term and give every doer of favor his favor.” 
Ibn Kathir said: It means and I commanded you to seek forgiveness from Allah SWT for your past sins and repent to Him from the sins and that you’ll continue with it. 
Imam al-Nawawi stated in the book Riyadh al-Salihin: “Scholars said, repenting from every sin is obligatory. If the transgression (sin) is between a slave and Allah SWT – of which has no relation with the rights of people – then there are three conditions:
- Distancing and avoiding the sin
- Regretting for ever committing the sin
- Determined and set a resolve to never repeat the sin forever
If one of the conditions isn’t fulfilled, then his repentance is invalid.
However, if the transgression involves the rights of others, then there are four conditions. They are the first three conditions with the addition of:
- He should ask to be freed from the right of the person he has wronged. If it is in the form of property or something similar, then he should return it (to the person he has taken it from unjustly). If it is in the form of a false accusation or others like it, then he should clear his name or seek his forgiveness. If it is in the form of ghibah, then it must be asked to be made halal. 
Performing Sunnah Repentance Prayer
In a hadith narrated by Abu Bakr al-Siddiq RA, he said: I heard Rasullullah PBUH said:
مَا مِنْ عَبْدٍ يُذْنِبُ ذَنْبًا فَيُحْسِنُ الطُّهُورَ ثُمَّ يَقُومُ فَيُصَلِّي رَكْعَتَيْنِ ثُمَّ يَسْتَغْفِرُ اللَّهَ إِلاَّ غَفَرَ اللَّهُ لَهُ ثُمَّ قَرَأَ هَذِهِ الآيَةَ وَالَّذِينَ إِذَا فَعَلُوا فَاحِشَةً أَوْ ظَلَمُوا أَنْفُسَهُمْ ذَكَرُوا اللَّهَ إِلَى آخِرِ الآيَةِ
“When a servant (of Allah) commits a sin, and he performs ablution well, and then stands and prays two rak’ahs, and asks pardon of Allah, Allah pardons him. He then recited this verse:
وَالَّذِينَ إِذَا فَعَلُوا فَاحِشَةً أَوْ ظَلَمُوا أَنْفُسَهُمْ ذَكَرُوا اللَّهَ
“And those who, when they commit indecency or wrong their souls, remember Allah,” (Surah Ali Imran:135) 
The above is proof of the existence of sunnah repentance prayer. This is also the opinion of Sayyid Sabiq in Fiqh al-Sunnah (1/211).
According to the above hadith, the Prophet PBUH gave a methodology for a person who has sinned to purify himself from the sin. It is by performing the ablution properly, then praying two rakaat and it is followed by istighfar to Allah SWT.
Syeikh Mulla ‘Ali al-Qari explained: What is meant by istighfar in this hadith is continuous repentance and stop from sinning and is determined to never commit it ever again. 
The following we share the methodology of performing the sunnah repentance prayer according to sahih narrations from Prophet PBUH. A person who wished to perform repentance prayer must:
First: Performing the ablution properly
In other words, by observing the obligatory and sunnah matters of ablution. Some scholars interpret the word purify in the hadith as showering and showering with cold water is better. This is possibly taken from the statement of the Prophet PBUH:
اللَّهُمَّ اغْسِلْ خَطايايَ بالماءِ والثَّلْجِ والبَرَدِ
“O Allah, wash away my sins with ice and water and frost.” 
Syeikh ‘Ali Al-Qari said: In the hadith, there is a sign to cold the heart from the heat of desires (hawa nafs). 
We are inclined towards stating that purify in the hadith refers to ablution. This is based on siyaq al-hadith (context of the hadith) which shows purification preceded praying.
Second: Performing two rakaat of prayer
This is what is known as sunnah repentance prayer in our community, although such a name isn’t mentioned in the hadith. While regarding what should be recited in the prayer, there is a hadith narrated from Ibn al-Sunni who said to recite surah al-Kafirun and surah al-Ikhlas. As such, one can also recite the verse stated in the hadith, which is verse 135 from surah Ali Imran or the following verse:
وَمَن يَعْمَلْ سُوءًا أَوْ يَظْلِمْ نَفْسَهُ ثُمَّ يَسْتَغْفِرِ اللَّهَ يَجِدِ اللَّهَ غَفُورًا رَّحِيمًا
“And whoever does a wrong or wrongs himself but then seeks forgiveness of Allah will find Allah Forgiving and Merciful.” 
These surahs or verses can be recited when performing sunnah repentance prayer and in our opinion other simple and easy to recite surah and verses of the Quran can also be recited when one is performing this sunnah prayer. This is in accordance with the general statement of Allah SWT:
فَاقْرَءُوا مَا تَيَسَّرَ مِنَ الْقُرْآنِ
“So, recite what is easy [for you] of the Qur’an.” 
Third: Istighfar to Allah SWT
After a person completed his sunnah repentance prayer, he should always increase his istighfar to Allah SWT. In our opinion this follows the statement of Allah SWT:
وَالَّذِينَ إِذَا فَعَلُوا فَاحِشَةً أَوْ ظَلَمُوا أَنْفُسَهُمْ ذَكَرُوا اللَّهَ فَاسْتَغْفَرُوا لِذُنُوبِهِمْ وَمَنْ يَغْفِرُ الذُّنُوبَ إِلا اللَّهُ وَلَمْ يُصِرُّوا عَلَى مَا فَعَلُوا وَهُمْ يَعْلَمُونَ
“And those who, when they commit an immorality or wrong themselves [by transgression], remember Allah and seek forgiveness for their sins – and who can forgive sins except Allah? – and [who] do not persist in what they have done while they know.” 
Istighfar can be done by reciting the phrase ‘’Astaghfirullah’’, or istighfar in the meaning of repenting to Allah SWT. If a person regrets the sin he committed, stop from committing it and is determined to never repeat it again forever.
May this explanation help us in performing sunnah repentance prayer the best we could. May Allah SWT accept our repentance and clean our souls from the darkness of sin and transgressions. Ameen.