Narrated Abu Masud:
The Prophet said, "The sun and the moon do not eclipse because of the death of someone from the people but they are two signs amongst the signs of Allah. When you see them stand up and pray."
Narrated 'Aisha :
In the life-time of Allah's Apostle (p.b.u.h) the sun eclipsed, so he led the people in prayer, and stood up and performed a long Qiyam, then bowed for a long while. He stood up again and performed a long Qiyam but this time the period of standing was shorter than the first. He bowed again for a long time but shorter than the first one, then he prostrated and prolonged the prostration. He did the same in the second Raka as he did in the first and then finished the prayer; by then the sun (eclipse) had cleared. He delivered the Khutba (sermon) and after praising and glorifying Allah he said, "The sun and the moon are two signs against the signs of Allah; they do not eclipse on the death or life of anyone. So when you see the eclipse, remember Allah and say Takbir, pray and give Sadaqa." The Prophet then said, "O followers of Muhammad! By Allah! There is none who has more ghaira (self-respect) than Allah as He has forbidden that His slaves, male or female commit adultery (illegal sexual intercourse). O followers of Muhammad! By Allah! If you knew that which I know you would laugh little and weep much.
The Muslim reaction to lunar and solar eclipses can be summarized as follows:
1. Solar and lunar eclipses are reminders of the Day of Judgment, when the sun, moon, and stars will all lose their light. [When the sight is dazed, and the moon is buried in darkness, and the sun and moon are joined together: Man will say on that day, ‘Where is the refuge?’] (Al-Qiyamah 75: 7-10)
2. Being a reminder of the Last Day, the eclipse is a time for Prayer, charitable acts, and generally remembering Allah and seeking His forgiveness.
3. To believe that heavenly bodies (sun, moon, planets, stars) have power over events and people’s fates and fortunes is to reject Allah by ascribing partners to Him. [And among His Signs are the night and the day, the sun and the moon. Prostrate neither to the sun nor to the moon, but prostrate to Allah who created them, if it is truly Him you worship.] (Fussilat 41: 37) Thus, one cannot worship God by worshiping creation—whether the devotions are offered to nature, heavenly bodies, idols, or human beings. The worship of something or someone created in whatever form, Muslims consider to be an underlying error of many groups active in the UK, from pagans, Druids and New Age cultures (for whom the eclipse is a sacred event) to the numerous Christian denominations. The popular but false, empty faith in astrology, so widespread in the popular press, is also condemned in Islam. Islam teaches people to constantly turn to the Source of all events: Allah.