It is narrated from Sayyiduna Samurah bin Jundub (may Allah be pleased with him) that the Prophet (peace and blessings be upon him) said: "Do not pray when the sun is rising or when it is setting, for it sets between the two horns of Satan and disappears between the two horns of Satan."
Hadith Referenceالمعجم الكبير للطبراني / باب السين / 6943