Can You Pray at Sunrise and Sunset?
Question

I read several hadiths that said if you pray at the time of sunrise and sunset, it is like praying between the two horns of Shaytan. These times for prayer are prohibited.  Also it stated that this is the time the Jinns pray to Shaytan.... is this a sound hadith?
Praise be to Allah.Shaykh Sa’d al-Humayd (may Allah have mercy on him) said:
"Yes, it was narrated in Sahih al-Bukhari (581) and Sahih Muslim (831) that it is forbidden to pray after Fajr prayer until the sun has risen above the horizon to the height of a spear, at the time of noon when the sun is at its zenith, and after the time of ‘Asr until the sun is fully set. 
The Prophet (peace and blessings of Allaah be upon him) told us that the sun rises and sets between the two horns of a devil, at which time the unbelievers prostrate to it." 
There is nothing in the hadith to say that the jinn pray to the devils at that time, rather the devils (shayatin) are the evil ones among the jinn.
For more details, please see the following answers: 48998, 20013, 34668, 81978, 8818, and 109254.
And Allah knows best.