See this @
http://www.chabad.org/library/article_cdo/aid/112226/jewish/Issues-in-Torah-and-Science.htmEclipses: Fate and FreedomOn the Verse, “Let there be luminaries… and they shall serve as signs…”31 Rashi quotes the statement of our Sages:32 “When the luminaries are stricken it is an ill omen for the world, as in the verse33 ‘Be not dismayed at the signs of heaven, etc.’ But when you comply with the will of G-d, you need not worry about punishment.”
Regarding the cause of eclipses the Talmud says,34 “On account of four things the sun is stricken: if the head of the rabbinical court dies and is not properly eulogized, etc. On account of four things the luminaries are smitten: on account of writers of forged documents, etc.” In other words, eclipses are related to people’s actions.
There is a famous question: The fact that the ‘luminaries are stricken’, i.e., that the sun and the moon become eclipsed, is a matter fixed in the nature of the cosmos, occurring at set intervals. In fact, one can even calculate in advance when it will occur. So how can we say that it happens as a result of human failings when it is really an unavoidable fact of nature?35
Over the course of time, certain people have used this “question” as “proof” that not everything the Sages said is correct.36 Thus, they excused and justified their own behavior, i.e., their decision not to fulfill Torah and Mitzvot.
The truth is, however, that one’s lack of Torah observance is not really because of his “intellectual questions”; it is rather because of the “appetite” of his emotions. The questions are no more than excuses to justify his improper behavior. That is why he can be comforted even with such a “question” that can be completely dispelled with even a little thought.
To preface:
It is well known that in Mishnaic and Talmudic times, the non-Jewish sages already knew the calculations to predict solar and lunar eclipses. Anyone who knows Jewish history (from the narratives in the teachings of our Sages, and — in greater detail — from the history texts of that era) knows that the non-Jewish scholars were in close contact with the Jewish Sages about matters of philosophy and science. They even traveled to meet each other and debate about various areas of knowledge,37 including astronomy.38
And even for those who are obstinate and unwilling to admit that the Jewish sages had a comprehensive knowledge of science39 and astronomy40 and that it was through them that this knowledge came to the non-Jews,41 it is nevertheless certain — completely beyond contention — that at the time when non-Jewish scholars knew about solar and lunar eclipses, our Sages knew as well,42 through the above-mentioned contact. This is especially true regarding astronomy, as the Sages had a particular interest in knowledge that impacts upon the Mitzvah of setting the Jewish calendar.43
It is therefore apparent that our Sages’ statement — that eclipses are an ill omen, and that they come because of specific misdeeds, etc. — cannot be contradictory to the necessity of eclipses according to the laws of nature.
Theoretically, one could explain44 that the statement that “eclipses are an ill omen, etc.” does not refer to the occurrence of the eclipses themselves, but rather to the fact that the person has seen one. Since the point of G-d exhibiting an “ill omen” would be so that the people should return to Him,45 they must obviously be able to see the sign.
Accepting this premise would answer our original question: All that is required by the laws of nature is the eclipse itself. Nature does not require that we be able to see the eclipse, since there could be clouds, etc., which conceal the eclipse.
This detail is dependent on human behavior: When people commit those “four misdeeds,” they are shown an ill omen by being able to see the eclipse, while if they are behaving properly there are clouds to conceal the eclipse, so that there is no “ill omen.”
However, this explanation is not satisfactory.
(First of all, there are some locations where there are almost never clouds, such as in Egypt.46 But in addition to that…)
From the wording of our Sages, “when the luminaries are eclipsed,” the implication is that the ill omen is the eclipse itself, and not the sighting of it.
This is why the Talmud47 differentiates there between Jews and heathens: “When the sun is stricken, it is an ill omen for heathens. When the moon is stricken, it is an ill omen for the ‘enemies of48 the Jews’; for Jews count by the moon and heathens by the sun.” The eclipse in their behavior causes the eclipse of the sun and moon. Solar and lunar eclipses (and failings) come as a result of the eclipses (and failings) in the behavior of heathens and Jews, respectively.
Thus, it is obvious that when Jews are behaving properly, there should not be any lunar eclipse at all (and not just that if there is one it would not be seen).
There is a simple explanation:49
The idea that “when the luminaries are stricken it is an ill omen” (and that this happens “on account of four things…”) is: When an eclipse occurs it is a sign that this time is dominated by a “mazal ra” — bad luck, or literally, an evil constellation.50 It is a time that has a predilection for tragedy. That, in turn, causes it to be a time more prone to being punished for the “four things.”
This is why “when you comply with the will of G-d, you need not worry about punishment.”51 If people are behaving as they should, there is nothing for which to be punished — even if it is a stricter time.
According to this interpretation, there is no longer any problem arising from the fact that eclipses must occur at predetermined times, in accordance with the laws of nature. Obviously the eclipse itself is not a consequence of human behavior. It is merely a sign of a period of tragedy, a time especially predisposed to punishment for the four things. These times (of bad luck etc.) with their omens are indeed predetermined within the nature of G-d’s creation [just like the times enumerated in tractate Shabbat:52 “One who is born on Sunday… will be a… etc.].