It is narrated from Sayyiduna Samurah (may Allah be pleased with him) that the Messenger of Allah (peace and blessings be upon him) said: "Do not deliberately aim to pray at the rising of the sun or at its setting, for it rises between the two horns of Satan and sets in the two horns of Satan."
Hadith Referenceالمعجم الكبير للطبراني / باب السين / 6916