The answer to this question is that both phrases are correct. The first phrase “It will rain” is used when the subject of the sentence (the word “it”) is future tense in relation to the time frame of the rest of the sentence. While,
the second phrase “It is going to rain” means that it will rain at a specific point in time in relation to now, or sometime in future.
As per the standard rules of grammar, both sentences are correct and grammatically sound.
“It will rain” is used as an independent clause while “It is going to rain” is used as a dependent clause.
Future tense is generally used with it, while present future tense is generally used with be going to.
Example: It will rain tomorrow
Example: It is going to rain tomorrow
However, there are few instances where both forms are interchangeable in meaning. For example: I am going to stay at home today because it will be raining all day. (In this case “it” can be replaced with either one of the first two variations).
“It will rain” is used to show the future tense while “It is going to rain” describes an event in the near future. So, if you have an interview tomorrow and you say, “It is going to rain tomorrow” (using present tense), it will not convey that it’s going to happen in the near future. Instead, it conveys that it’s going to happen at some point in time after tomorrow. So, this phrase can’t be used as a substitute for “It will rain”.
However, on the other hand if you want to specify a specific day for example Sunday for raining then you can use both phrases interchangeably such as:
Example : It will rain on Sunday.
This expression means that if it will rain on Sunday it will happen ONLY on that day. It doesn’t rain every day, but it rains on Sunday.
The meaning of the sentence is “It will probably not rain tomorrow, but as it is Sunday, chances are it may happen.”
Example : It will probably rain tomorrow (using present tense) or It is going to rain on Sunday. (using future tense).
The literal meaning of the sentence is “It may or may not happen”, but what we really mean is “It may happen or it will probably happen tomorrow.” We are using a conditional statement.