* How dirty is the rain? In areas with high pollution, rain can contain contaminants that could irritate your scalp or leave your hair feeling dirty.
* How long were you in the rain? A brief exposure to clean rain is unlikely to require a wash. Prolonged exposure or heavy rain might warrant a wash, especially if you're concerned about the rain's cleanliness.
* Your hair type: Some hair types are more prone to absorbing pollutants. If you have fine or porous hair, you might be more likely to want to wash it after being in the rain.
* Your personal preference: Some people simply don't like the way their hair feels after being rained on, regardless of how clean the rain is.
In general, if you were only briefly exposed to clean rain, you probably don't need to wash your hair. However, if you were in the rain for a long time, the rain was dirty, or you simply don't like the way your hair feels, washing it is a good idea.