For the first blank you will use present perfect. Present perfect is formed with a combination of the auxiliary verb “have” as either "have" or "has" with the past participle form of “rain” as "rained."
- It has not rained for months.
In the second half, you can use present perfect progressive to show an ongoing action because of the words “now” and “suddenly” in the sentence.
- It has not rained for months; now suddenly it has been raining for hours.
The use of “for hours” indicates that we need an ongoing continues action. For that, we use progressive aspect (also called continuous) "have/has" with the present participle form of "rain" as "raining."
It did not rain for months, now suddenly it is raining for hours.