It is narrated from Sayyiduna Safwan bin al-Mu'attal (may Allah be pleased with him) that the Prophet (peace and blessings be upon him) said: "When the sun rises, Satan accompanies it; when it climbs high, Satan parts from it. Then when it nears its zenith, Satan accompanies it, and when it passes the zenith, he parts from it. When it nears setting, Satan accompanies it, and when it sets, he parts from it." So he (peace and blessings be upon him) forbade praying at those times.
Hadith Referenceالمعجم الكبير للطبراني / باب الصاد / 7313