[Al-Bukhari said:] I was informed by Yahya ibn Bukayr that he was informed by Layth on the authority of Yunus that Ibn Shihab said: Abu Salma reported to me that Abu Hurayra, may God be pleased with him, said:
The Prophet, God's blessings and peace be upon him, said:
"God says: 'The children of Adam revile Fate, yet I am Fate, and Night and Day are in My hand.'"
[Ibn Hajar said:] The meaning of the prohibition against reviling Fate is that the true agent is God. Vilification is reserved for perceived wrongdoers whose actions we condemn, so if you revile the One through Whom some fate befalls you, that condemnation reverts to God.
My commentary on this was summarized above in the chapter of Qur’anic exegesis (on 45:24). There are three basic interpretations of the hadith. According to one, God "is" Fate in the sense that He has forethought of all matters. By another interpretation, it is in the sense of God's authorship of all things that He "is" Fate. By a third, He "is" Fate insofar as He is more powerful than it, which is why He goes on to say that "Night and Day are in My hand." The narration of this hadith by Zayd ibn Aslam on the authority of Abu Salih Dhakwan has it that "Night and Day are in My hand, and some things I renew, and some I cause to wither, and I bring reigns of dynasts to their end." This is how Ahmad ibn Hanbal reports the hadith.
The fact of the matter is that any agency attributed to Fate is anathema. To speak of Fate in such a way is not necessarily an act of unbelief, unless it expresses the speaker's actual convictions. In any case, it is best avoided, because fatalism is typical of unbelief. It is like saying [that a shower of rain was caused by this or that seasonally-rotating star, using the expression:] "We were brought rain by such-and-such [an asterism]." This expression was discussed in a previous chapter.
Al-Qadi ‘Iyad said: It was claimed by a certain person, in despite of true discernment, that al-Dahr (Fate) is one of the names of God. This is erroneous. Al-Dahr is the fullest extent of sublunary time, understood by some people as all that God brings about in the mortal world, up to their deaths. Through their ignorance, fatalists and Epicureans seize upon the outward surface of the hadith, believing Fate to be nothing more than rotation of the celestial spheres. But only those with no grounding in knowledge are convinced by this. May God, the All-Knowing, assist us! He is the One true Craftsman, and they've got nothing. The hadith itself refutes them, where God goes on to say: "I overturn Night and Day." How can anything be overturned by itself? God, be He Exalted, is Higher and Greater then anything they say of Him.
Ibn Abi Jamra said: Anyone who reviles a craftsman's work obviously vilifies the craftsman along with it. To revile Night and Day themselves is a grave matter, and a senseless one. Usually it is events that occur during Night or Day that people mean to condemn—and this is what gives context to the hadith and its prohibition against blaming them, as if to say: "Night and Day are not at fault."
Some events are made to happen through the actions of sentient beings, who are thereby responsible for them. In terms of religious law and ordinary speech, such events are ascribed to whoever carries them out, but also to God, because of His divinity and power. Now the actions of God's servants are of their own acquiring, which is why they are subject to judgment, and have been since the beginning of Creation. Then there are events that occur through no one's action, and these we ascribe to the determination of the Almighty. But no agency or responsibility can be ascribed to Night and Day, whether through reason, religious law, or everyday speech. This is the meaning of the hadith. And for animals lacking reason the same applies.
Ibn Abi Jamra points out that this is a case of Admonition against the lower by means of the higher, [saying: "Night and day are among the greatest signs in Creation. They signify the reality of His Godhead, and this is why He points them out as objects for contemplation, be He Exalted and Magnified (3:190): 'In the creation of the heavens and the earth, and in the alternation of night and day, there are signs for the perspicacious.'"] The prohibition against reviling Night and Day is indicative of the prohibition of reviling anything at all, unless dictated by religious law. Because [whether one vilifies the high or the low,] the fault is the same. And God knows best.
From Victory of the Creator: A Commentary on the Sahih of al-Bukhari by Ibn Hajar al-‘Asqalani