The best way to keep mold and mildew from returning to vinyl siding, is to attack the mold before it gets out of control.  The best time is late spring-early summer when you see the mold starting to grow.
Your house's location determines the dirt you'll likely encounter. Very Damp areas and North facing elevations are more likely to accumulate mold and algae on vinyl siding, while dry or windy climates may produce a more significant dirt buildup.
One of the most common reasons for vinyl siding stains is the result of tree branches or large bushes located within a few feet or even touching the vinyl siding.  Another issue is allowing grass to grow against the foundation of your house without using landscape beds.