Rain gear is something I carry with me at all times when I'm hiking. The upper rain jacket also serves as a windbreaker. A windbreaker is a necessity for the higher elevation hikes. Oceans and mountains are notorious for rapid weather changes. When you are hiking in Glacier National Park you don't always get a warning about an approaching storm. On the east side you can be several thousand feet below the ridge line and unable to see bad weather forming. So don't forget to bring your rain gear.
Good rain gear is readily available. Over the last few years the only major change to my rain gear is substituting rain pants with leg zippers for regular rain pants. The leg zippers allow me to slip the rain pants on without removing my hiking boots. For me that's a big deal. For others it will depend on how flexible you are after having hiked for four or five hours.
Good durable, breathable, rain gear can be pricey. If you are only carrying rain gear for emergencies then you can get away with inexpensive rain gear. In my experience it's false economy as the cheap rain gear tends to rip easily and holds your sweat inside. Just as you have to decide what hike you are going to take, you will have to decide how much you want to spend on your rain gear. As I have mentioned elsewhere on this site, I still have and use camping gear that I bought in 1971. Well I finally updated my rain coat this year after a very wet spring. First hike it saved me from getting a soaking and despite the warm weather I was not soaked on the inside.
For extra measure I also carry disposable gloves, which can give you that little bit of extra warmth if the weather shifts suddenly. When hiking in the spring and fall I always carry winter gloves.
Rain gear can also serve as a windbreaker. The hikes that cross the continental divide tend to be very windy as you near the pass. Even if it's sunny when the wind starts gusting you are going to need a windbreaker. Your rain gear will serve double duty. If it's just wind I don't usually put on my rain pants, but the windbreaker is a welcome relief and a very valuable part of my rain gear.