It {some form of rain} for three days. the farmers were very happy to water their fields.
Your sentence sounds like it's trying to say the rain watered/is watering the fields, then suddenly says the farmers are watering their fields.
When it rains, the rain is doing the watering, not the farmers. The farmers would be happy that their fields are watered by the rain.
It was raining for three days; the farmers were very happy to have their field watered.
This is fine.
It had been raining for three days; the farmers were very happy to have their field watered ... when ???
This sentence sounds like it has something missing. The farmers were very happy to have their field watered sounds like an "aside" more than the complete idea because watered implies whatever is providing water is "done" with that.
However "It had been raining for three days" sounds like it's still raining - either now, or within the timeline of events in the past you're talking about.