Let’s be a bit more specific and talk about gentle rains with maybe a bit of thunder in the distance while you are indoors or under shelter. There are a large number of things that contribute.
First, the soft white noise. A gentle rain creates tons of mildly distracting pleasant white noise. This helps reduce stress.
It amplifies positive feelings of comfort, shelter and safety. You don’t get these positive feelings when you are outdoors working in the rain, you get them when the rain is not drenching you. So there is a difference between indoors (where you are comfortable) and outdoors (where you wouldn’t be). And this contrast can be bigger if there is thunder off in the distance somewhere. And such rains come when it is usually comfortably humid and cool, rather than sticky and too hot.
Gentle rains are tied to an emotional state of calmness too because they are associated with a history of calm activities and “me time”, relaxing and not working. The last time there was a day like this you pampered yourself a little with a good book on a comfortable couch… so you look forward to the next time.
Rain symbolizes renewal and cleanliness. It’s a positive source of growth for plants and it often produces a nice clean smell as it washes dust away. So there is a mental association with a few positives there.
And for those of us who live in temperate zones, this type of pleasant rain means it’s not snowing and there are leaves on the trees, and so it’s what most of us consider to be the better time of the year.