The Command to establish the Prayer
Allah says;
وَأَقِمِ الصَّلَةَ طَرَفَيِ النَّهَارِ وَزُلَفًا مِّنَ اللَّيْلِ إِنَّ الْحَسَنَاتِ يُذْهِبْنَ السَّـيِّيَاتِ
ذَلِكَ ذِكْرَى لِلذَّاكِرِينَ
And perform the Salah, at the two ends of the day and in some hours of the night. Verily, the good deeds remove the evil deeds. That is a reminder for the mindful.
Ali bin Abi Talhah reported that Ibn Abbas said,
وَأَقِمِ الصَّلَةَ طَرَفَيِ النَّهَارِ
(And perform the Salah, at the two ends of the day),
"This is referring to the morning prayer (Subh) and the evening prayer (Maghrib)."
The same was said by Al-Hasan and Abdur-Rahman bin Zayd bin Aslam.
In one narration reported by Qatadah, Ad-Dahhak and others, Al-Hasan said,
"It means the morning prayer (Subh) and the late afternoon prayer (Asr)."
Mujahid said,
"It is the morning prayer at the beginning of the day and the noon prayer (Zuhr) and late afternoon prayer (Asr) at the end of the day."
This was also said by Muhammad bin Ka`b Al-Qurazi and Ad-Dahhak in one narration from him.
وَزُلَفًا مِّنَ اللَّيْلِ
(and in some hours of the night).
Ibn Abbas, Mujahid, Al-Hasan and others said,
"This means the night prayer (Isha')."
Ibn Al-Mubarak reported from Mubarak bin Fadalah that Al-Hasan said,
"This means the evening (Maghrib) and late night (Isha') prayers.
The Messenger of Allah said,
هُمَا زُلَفَا اللَّيْلِ الْمَغْرِبُ وَالْعِشَاء
They are the approach of the night;Maghrib and Isha'.
The same was said by Mujahid, Muhammad bin Ka`b, Qatadah and Ad-Dahhak (that this means the Maghrib and Isha' prayers).
It should be noted that this verse was revealed before the five daily prayers were made obligatory during the night of Isra' (the Prophet's night journey to Jerusalem). At that time there were only two obligatory prayers;a prayer before sunrise and a prayer before sunset.
During the late night another prayer (Tahajjud) was also made obligatory upon the Prophet and his nation. Later, this obligation was abrogated for his nation and remained obligatory upon him. Finally, this obligation was abrogated for the Prophet as well, according to one opinion. Allah knows best.
The Good Deeds wipe away the Evil Deeds
Concerning Allah's statement,
إِنَّ الْحَسَنَاتِ يُذْهِبْنَ السَّـيِّيَاتِ
Verily, the good deeds remove the evil deeds.