"I heard my father say: 'I heard 'Uqbah bin 'Amir Al-Juhani say: There are three times during which the Messenger of Allah (ﷺ) forbade us to pray in or bury our dead: When the sun has clearly stated to rise, until it is fully risen; when it is directly overhead at noon, until it has passed its zenith; and when it is close to setting, until it has fully set.'"
Hadith Text & Reference
"I heard my father say: 'I heard 'Uqbah bin 'Amir Al-Juhani say: There are three times during which the Messenger of Allah (ﷺ) forbade us to pray in or bury our dead: When the sun has clearly started to rise, until it is fully risen; when it is directly overhead at noon, until it has passed its zenith; and when it is close to setting, until it has fully set.'"
Source: Sunan an-Nasa'i 560 | The Book of the Times (of Prayer)
Prohibition Times Explained
First Prohibition: From when the sun begins to rise until it is completely above the horizon. This is when the sun's disc first appears until it is fully visible.
Second Prohibition: When the sun is at its zenith (exactly overhead at noon) until it begins to decline westward. This is a brief period when the sun reaches its highest point.
Third Prohibition: From when the sun begins to set (yellowing of the sun) until it completely disappears below the horizon.
Wisdom Behind the Prohibition
These times are prohibited because the sun worshippers prostrate to the sun during these periods. Muslims must distinguish their worship from polytheistic practices.
The prohibition applies to voluntary prayers only, not obligatory prayers or missed prayers (qada'). The gates of heaven are closed during these times when the sun is at its extremes.
Scholarly Consensus
This prohibition is agreed upon by the majority of scholars including the four schools of jurisprudence. The wisdom preserves the purity of Islamic worship and prevents resemblance to sun-worshippers.
Exceptions include prayers with specific causes (like greeting the mosque, eclipse prayer, or after ritual purity) and funeral prayers, which are not included in this prohibition.