Allah's Messenger (ﷺ) said: "The sun and the moon are two signs amongst the signs of Allah and they do not eclipse because of the death of someone but Allah frightens His devotees with them."
Sahih al-Bukhari Book 16, Hadith 9