Almost unavoidable, to be honest. If you wear a skirt or dress, at some point you will experience having it blown up by the wind or someone trying to sneak a peak. Just the nature of the beast, I guess. Not wearing anything ridiculously short is a good start and maybe going with some type of Spanx or shorts underneath will also offer some protection. I don't lose any sleep over it, as it's not worth it. I usually just wear my panties and pantyhose and get over it, There are creeps and pervs everywhere.
Dont wear provocative crap, or wear something under your skirt. I personally stick to fitted skirts, knee length or just above because i dont wanna worry about holding my skirt down all the time or some perv looking up it.
I bought bike shorts to wear underneath, but that makes my sundresses warmer and the whole point of a sundress is so I don't boil! So I usually just try to be careful and make sure I don't wear a dress to go play with kids at the playground lol