It says in the Quran: “He has made subject to you the Night and the Day; the sun and the moon; and the stars are in subjection by His Command: verily in this are signs for men who are wise” (16:19). Therefore, it is important that we acknowledge the signs in nature, and it is also important that we do so in the right way. At times people have taken an eclipse to signify an important event, but in Islam, they simply serve as a reminder of Allah’s power over creation and to seek his forgiveness.
Nowadays, modern technology means that we are aware of when an eclipse is likely to happen, but at the time of Prophet Mohammed (SAWS), the darkness in the middle of the day that slowly increases, must have stirred even greater emotion. Whether we are expecting it or not, there is a specific prayer that should be said at the time of an eclipse called Salatul Kusoof.
During this prayer, you must do ruku twice, whereas in most prayers, including the five daily prayers, we do ruku once in each rakat. So, you recite surah Fatihah and another surah, go into ruku and then stand up straight, but instead of prostrating in sajdah, you recite surah Fatihah and another surah again, before going into ruku, standing and then prostrating in sajdah. It essentially involves an extra recitation and ruku at the start of the prayer. There are two rakats in Salatul Kusoof and they are both done in this way; the only difference is that the recitations should be as lengthy as you can make them, and the first one should be longer than the second. This is described in the following hadith recorded in Bukhari and Muslim:
Aishah said: “The sun was eclipsed during the lifetime of the Messenger of Allah (SAWS). The Messenger of Allah (SAWS) went out to the mosque and stood and said takbeer, and the people formed rows behind him. The Messenger of Allah (SAWS) recited for a long time, then he said takbeer and bowed for a long time. Then he said, “Sami‘a Allahu liman hamidah” (Allah hears those who praise Him).
Then he stood and did not prostrate, and recited for a long time, but it was shorter than the first time.
Then he said takbeer and bowed for a long time, but it was shorter than the first time.
Then he said, “Sami‘a Allahu liman hamidah, Rabbana wa laka al-hamd” (Allah hears those who call upon him; our Lord, to You be praise).
Then he prostrated. Then he did likewise in the second rak’ah. Thus he did four bowings and four prostrations.”