of the night: that is, during that very night.
When he turned around: meaning that he faced the worshippers; it does not mean that he left the spot.
“Do you know…?”: the interrogative form here serves to draw their attention.
“of My servants”: servitude here is meant in its universal sense.
“and a disbeliever”: i.e., a case of minor disbelief.
“We have been given rain by such-and-such a constellation”: ascribing the rainfall to something other than Allah while still believing that Allah is the One who actually sends it.
“Such-and-such a constellation has spoken the truth”: i.e., the clouds and rain associated with that particular star have proven true.
“But no! I swear…”: this is an oath by Allah; He may swear by whatever of His creation He wills.
“by the setting-places of the stars”: according to most Qur’anic exegetes, this refers to the points where the heavenly bodies rise and set.
Overall meaning of the ḥadīth: This noble Companion recounts how the Prophet ﷺ guided his community, on the occasion of rainfall, regarding what they should say. He reports—on the authority of his Lord—that when Allah tested people by granting them the life-giving rain, they divided into two groups. One group acknowledged Allah’s favor and gratefully attributed the blessing to Him; the other denied His grace and attributed the blessing to the rising or setting of a star. The first response is deemed faith, the second disbelief.
In Ibn ʿAbbās’s version, the verses, “But no! I swear by the setting-places of the stars…” (Q 56:75) and those that follow were revealed to repudiate the claim that rainfall is caused by the stars.