Too wet soil will cause this. Wipe it off and if possible place a rock under it to prevent it touching the soil. It needs air flow.
I read that baking soda in water spray is supposed to do but haven't had to try it yet
The mold actually spreads from beetles that bite the leaves so the key is to control the beetles. Use special barrier cloths, available from the garden center, to keep the bugs out!
I've recently sprayed plants with hydrogen peroxide because of what looked like mildew. They were, however, ornamentals in a covered area. I don't know what sun would do to plants after spraying them. Good air circulation is crucial to squash and tomato plants.