Wa`alykum As-Salamu Warahmatullahi Wabarakatuh.
In the Name of Allah, Most Gracious, Most Merciful.
All praise and thanks are due to Allah, and peace and blessings be upon His Messenger.
Dear brother in Islam, we would like to express our thanks and appreciation for your good question, which is an assured sign of your keenness on observing acts of worship, especially Salah (Prayer), the outstanding pillar of Islam.
Prayer, in Islam, has its own particular times at which it must be performed. Allah, Most High, says, "Prayer at fixed hours has been enjoined upon the believers." (An-Nisa': 103)
As for the times in which one is to abstain form offering Prayer, the prominent Muslim jurist, Ahmad ibn Naqeeb Al-Misri, states in his well-known book, The Reliance of the Traveler:
"The Prayer becomes unlawful and invalid in the following five times:
1. from sunrise until the sun is a spear's length above the horizon (meaning when a distance equal to the sun's diameter appears between the sun and the horizon),
2. from the time the sun is at its highest point in the sky until it moves on,
3. from the time when the sun yellows before sunset until after it has set,
4. after praying the current Dawn Prayer (Subh), and
5. after praying the current Afternoon Prayer (`Asr).
It is permissible at the above times to offer non-obligatory Prayers that are performed for a particular reason, such as the funeral prayer, greeting the mosque, or the two Rak`as that are Sunnah after ablution (Wudu'); and is also permissible to make up missed Prayers.
It is not offensive to pray within the Sacred Precinct (Haram) in Makkah at any time, i.e. the above rule doesn’t apply to Prayer within the Haram, nor is it offensive to pray when the sun is at its zenith on Fridays (whether in the Sacred Precinct or elsewhere).” ?