Allah says, “Pray at the two ends of the day and in some watches of the night. Lo! Good deeds annul evil deeds. This is a reminder for the mindful” (Hud 114). Surah al-Isra’ states, “Establish prayer at the setting of the sun until the dark of the night, and (the recital) of the Qur’an at dawn. Lo! The recital of the Qur’an at dawn is ever witnessed” (al-Isra’ 78), and “Celebrate the praises of your Lord before the rising of the sun and before its setting. Glorify Him some hours of the night and at the two ends of the day, that you may find acceptance” (Taha 130). This verse specifically refers to the dawn prayer and the afternoon prayer, as it is recorded in the two Sahihs. Jarir ibn ‘Abdullah al-Bajali reported, We were sitting with the Messenger of Allah and we looked at the moon on a clear night. The Prophet said, ‘You will see your Lord as you see this moon, and you will not be harmed by seeing Him. So, if you can, do not let yourselves be overpowered in the case of prayer before the rising of the sun and its setting,’ and he recited the above verse.”
Those are the times of the prayers that the Qur’an mentions. From the sunnah, we have the following:
‘Abdullah ibn ‘Amr reported that the Messenger of Allah, upon whom be peace, said, “The time of the noon prayer is when the sun passes the meridian and a man’s shadow is the same length as his height. It lasts until the time of the afternoon prayer. The time of the afternoon prayer is until the yellowing of the sun (during its setting). The time of the evening prayer is as long as twilight. The time of the night prayer is to the middle of a night of medium duration. And the time of the morning prayer is from the appearance of the dawn until the time of sunrise. When the sun rises, abstain from praying, as it rises between the horns of Satan.” (Related by Muslim.)
Narrated Abu Dharr: Allah’s Apostle said, “While I was at Mecca the roof of my house was opened and descended, opened my chest, and washed it with Zam-zam water. Then he brought a golden tray full of wisdom and faith and having poured its contents into my chest, he closed it. Then he took my hand and ascended with me to the nearest heaven, when I reached the nearest heaven, Gabriel said to the gatekeeper of the heaven, ‘Open (the gate).’ The gatekeeper asked, ‘Who is it?’ Gabriel answered: ‘Gabriel.’ He asked, ‘Is there anyone with you?’ Gabriel replied, ‘Yes, Muhammad is with me.’ He asked, ‘Has he been called?’ Gabriel said, ‘Yes.’ So the gate was opened and we went over the nearest heaven and there we saw a man sitting with some people on his right and some on his left. When he looked towards his right, he laughed and when he looked toward his left he wept. Then he said, ‘Welcome! O pious Prophet and pious son.’ I asked Gabriel, ‘Who is he?’ He replied, ‘He is Adam and the people on his right and left are the souls of his offspring. Those on his right are the people of Paradise and those on his left are the people of Hell and when he looks towards his right he laughs and when he looks towards his left he weeps.’ Then he ascended with me till he reached the second heaven and he (Gabriel) said to its gatekeeper, ‘Open (the gate).’ The gatekeeper said to him the same as the gatekeeper of the first heaven had said and he opened the gate. Anas said: “Abu Dharr added that the Prophet (SAW) met Adam, Idris, Moses, Jesus and Abraham. He (Abu Dharr) did not mention on which heaven they were but he mentioned that he (the Prophet (SAW)) met Adam on the nearest heaven and Abraham on the sixth heaven. Anas said, “When Gabriel along with the Prophet (SAW) passed by Idris, the latter said, ‘Welcome! O pious Prophet and pious brother’ The Prophet (SAW) asked, ‘Who is he?’ Gabriel replied, ‘He is Idris.’ The Prophet (SAW) added, “I passed by Moses and he said, ‘Welcome! O pious Prophet and pious brother.’ I asked Gabriel, ‘Who is he?’ Gabriel replied, ‘He is Moses.’ Then I passed by Jesus and he said, ‘Welcome! O pious brother and pious Prophet.’ I asked, ‘Who is he?’ Gabriel replied, ‘He is Jesus.’ Then I passed by Abraham and he said, ‘Welcome! O pious Prophet and pious son.’ I asked Gabriel, ‘Who is he?’ Gabriel replied, ‘He is Abraham.’ The Prophet (SAW) added, “Then Gabriel ascended with me to a place where I heard the creaking of the pens.” Ibn Hazm and Anas bin Malik said: The Prophet (SAW) said, “Then Allah enjoined fifty prayers on my followers. When I returned with this order of Allah, I passed by Moses who asked me, ‘What has Allah enjoined on your followers?’ I replied, ‘He has enjoined fifty prayers on them.’ Moses said, ‘Go back to your Lord (and appeal for reduction) for your followers will not be able to bear it.’ (So I went back to Allah and requested for reduction) and He reduced it to half. When I passed by Moses again and informed him about it, he said, ‘Go back to your Lord as your followers will not be able to bear it.’ So I returned to Allah and requested for further reduction and half of it was reduced. I again passed by Moses and he said to me: ‘Return to your Lord, for your followers will not be able to bear it. So I returned to Allah and He said, ‘These are five prayers and they are all (equal to) fifty (in reward) for My Word does not change.’ I returned to Moses and he told me to go back once again. I replied, ‘Now I feel shy of asking my Lord again.’ Then Gabriel took me till we reached Sidrat Muntaha (lote tree of the utmost boundary) which was shrouded in colors, indescribable. Then I was admitted into Paradise where I found small (tents or) walls (made) of pearls and its earth was of musk.”