Narrated Ibn 'Umar: Allah's Messenger ﷺ said, "When the (upper) edge of the sun appears (in the morning), don't perform a prayer till the sun appears in full, and when the lower edge of the sun sets, don't perform a prayer till it sets completely. And you should not seek to pray at sunrise or sunset for the sun rises between two sides of the head of the devil (or Satan).
The Prophet Muhammad ﷺ taught us that prayer is an important part of our faith and it must be done with intention and focus on God Almighty. He also taught us to stay away from activities associated with Satan such as praying at sunrise or sunset which are times when he can have more influence over people’s actions. By following these teachings, we can ensure that our prayers are accepted by Allah SWT and remain focused on Him alone without any distractions from Shaytan.