It was narrated from 'Abdullah As-Sunabihi that the Messenger of Allah (ﷺ) said:
The sun rises and with it the horn of the Shaitan, then when it is fully risen, he goes away. Then when it approaches the meridian he comes near to it, and when it has passed the zenith he goes away. Then when it is close to setting, he comes near to it, then when it has set, he goes away. And the Messenger of Allah (ﷺ) forbade praying at those times.