It is now known that eclipse is nothing but a normal process that occurs after a regular interval (that can be known) of the moon coming between the sun & the earth. Then why was it that Holy Prophet(pbuh) used to pray at that time, though it didn't cause any danger!?
When the sun was eclipsed at the time of the Messenger of Allaah (peace and blessings of Allaah be upon him), he commanded someone to call out “al-salaatu jaami’ah (prayer is about to begin)”, and he led the people in prayer. Then he addressed them and explained to them the reason for the eclipse, and declared their jaahili beliefs to be null and void. He explained to them what they should do, such as praying and making du’aa’ and giving in charity. He (peace and blessings of Allaah be upon him) said: “The sun and the moon are two of the signs of Allaah; they do not become eclipsed for the death or life of anyone. If you see that then call upon Allaah and magnify Him, and pray, and give in charity.” The Muslims did not know when an eclipse would happen, but when it did happen, they would hasten to do what Allaah had prescribed, such as praying etc.
When an eclipse happened, they would be afraid that is was a warning of impending disaster, so they would turn to Allaah and pray to Him to ward off that which they feared. When astronomy and the calculations of the movements of the sun and moon became well known in later times, and it became known that the experts could know when an eclipse was likely to happen, the scholars (‘ulamaa’) pointed out that this did not change the ruling, and that the Muslims still had to do what they were commanded to do at the time of an eclipse, even if they knew about it in advance. But it is not prescribed to concern ourselves with the matter of predicting eclipses, because that is not what Allaah and His Messenger commanded us to do. The scholars also explained that an eclipse may be a sign or a cause of something bad happening to people. When the questioner says that eclipses do not cause hrm, she is speaking without knowledge and objecting to the sharee’ah of Allaah. People do not necessarily know of the events which Allaah causes to happen at the time of an eclipse, and some people may know about that whilst others do not. It could be that because of the Muslims’ prayers, Allaah wards off bad things which are known only to Him. The Muslim must submit to the ruling of Allaah and act in accordance with His sharee’ah, and have faith in His wisdom, because He is the All-Knowing, All-Wise, may He be glorified and exalted.
(Written by Shaykh ‘Abd al-Rahmaan al-Barraak).
Solar and lunar eclipses are two of the signs of Allaah with which He scares His slaves and reminds them of some of the things which will happen on the Day of Resurrection, when the sun will be wound round and will lose its light and be overthrown and the stars will fall (cf. al-Takweer 81:1), and the sight will be dazed, the moon will be eclipsed and the sun and moon will be joined together (by going into one another, or folded up, or deprived of their light) (al-Qiyaamah 75:8-9). This is why Muslims should be alarmed by eclipses. The Prophet (peace and blessings of Allaah be upon him) used to fear Allaah very much, and one day he came out in an agitated state, thinking that the Hour had begun, when the sun was eclipsed during his lifetime… This is indicative of the great extent to which he kept the Hour in mind and feared it. We, on the other hand, have become negligent and most people no longer think of eclipses as anything other than a natural phenomenon which they go out to watch with special glasses, carrying cameras. They limit themselves to the worldly scientific explanation without understanding the reminder of the Hereafter which it brings. This is one of the signs of hard-heartedness and a lack of concern about the matters of the Hereafter. It reflects a lack of fear of the onset of the Hour, and ignorance of the aims of sharee’ah and the reports that the Prophet (peace and blessings of Allaah be upon him) used to feel fear when these eclipses happened. The Sahaabah (may Allaah be pleased with them) used to stand to pray the eclipse prayer, because they believed that if indeed the Hour had come, they would not then be counted negligent of their prayer, and if this eclipse was nothing to do with the Hour, then they would not lose anything by praying, for they would have earned a great reward. We ask Allaah to make us among those who fear Him and who are afraid of the Hour. May Allaah bless our Prophet Muhammad.