Understand it comes from a time when bad weather could interrupt income, hence saving for difficult times. Farmers would often save grain for a rainy day, as they couldn't work in their fields during storms.
Pro Tip 2/3
Not Literal
The phrase is not about actual weather, but about being prepared for any challenging situation. Even though it's sunny, he still likes to save for a rainy day.
Pro Tip 3/3
Common Usage
Most often used for saving money, but can also apply to other items or situations of eventual need. I'm keeping these candles for a rainy day in case the power goes out.