Praise be to Allah.
Forecasting the weather does not come under the heading of astrology or claiming to have knowledge of the unseen, rather it is based on physical evidence and experience, and study of the natural laws established by Allaah. The same applies to knowing the times of solar and lunar eclipses, or when there are likely to be strong winds and rainfall.
It says in Fataawa al-Lajnah al-Daa’imah: The time of solar and lunar eclipses may be known from calculating the movements of heavenly bodies, from which it may also be known whether the eclipse will be total or partial. There is nothing strange about that, because this is not a matter of the unseen for everyone, rather it is only “unseen” for those who have no knowledge of astronomy and it is not “unseen” for those who have knowledge of this science. That does not mean that solar and lunar eclipses are not among the signs of Allaah with which He instils fear in His slaves so as to bring them back to their Lord and to obedience to Him.
It also says:
Forecasting the weather and predicting strong winds and storms or saying where clouds are expected to form or where rain is likely to fall is based on knowledge of the natural laws of Allaah. One who has experience of these laws may say what he expects to happen, without certain knowledge, on the basis of scientific theories or common experience, so he expects that and predicts it on the basis of likelihood, not certain knowledge, and he gets it right sometimes and gets it wrong sometimes. End quote from Fataawa al-Lajnah al-Daa’imah.
Shaykh Ibn ‘Uthaymeen (may Allaah have mercy on him) said: The one who speaks of that which may be worked out by calculations is not a fortune-teller at all, because there is no element of fortune-telling in that which may be worked out by calculations. If a person predicts a solar or lunar eclipse, this is not fortune-telling because it is worked out by calculations. If he says that the sun will set at a 20-degree angle at such and such a time, this is not knowledge of the unseen, because it is something that may be worked out by calculations, and predicting something that can be worked out by calculation, even if it is in the future, is not regarded as being knowledge of the unseen, or fortune-telling.
Is twenty-four hour weather reporting such as we have now fortune-telling?
The answer is no, because it is also based on scientific data which is describing climatic conditions, because climatic conditions have to do with precise measurements that are known to them. Thus they may predict that certain conditions are likely to produce rain or not. That is like the primitive predication that we make when we see clouds forming, and thunder and lightning and thick clouds, and we say: “It is going to rain soon.”
What matters is that what points to physical phenomena is not knowledge of the unseen, even if some of the common folk think that these things are matters of the unseen and say that believing in them is like believing in fortune-telling.
End quote from al-Qawl al-Mufeed Sharh Kitaab al-Tawheed.
See al-Fataawa al-Kubra by Shaykh al-Islam Ibn Taymiyah (4/424) with regard to the knowledge of astronomers about the times of solar and lunar eclipses, the beginning of spring and winter, and other matters that may be known by means of calculations and are not matters of the unseen.
And Allaah knows best.