The Prophet (ﷺ) said, "the sun and the moon do not eclipse because of the death or life of someone, but they are two signs amongst the Signs of Allah. So, if you see them, offer the Prayer (of eclipse).
Sahih al-Bukhari Book 59, Hadith 15