Messenger of Allah ﷺ said, "The sun and the moon do not eclipse because of someone's death or life but they are two signs amongst the signs of Allah, so pray whenever you see them." (Using translation from Bukhārī 1057)
عَنْ رَسُولِ اللهِ ﷺ أَنَّهُ قَالَ إِنَّ الشَّمْسَ وَالْقَمَرَ لَا يَنْكَسِفَانِ لِمَوْتِ أَحَدٍ وَلَا لِحَيَاتِهِ وَلَكِنَّهُمَا آيَةٌ مِنْ آيَاتِ اللهِ فَإِذَا رَأَيْتُمُوهُمَا فَصَلُّوا