See the sections on Managing Insect Pests and Minimizing Plant Diseases for specific ways to prevent these problems. Some things to keep in mind:
During most of the growing season, your plants need about 1 inch of water per week. If you don't get that much rain, your plants will benefit from a thorough watering to make up the difference. If you use a sprinkler, water early in the day so that the plants dry quickly. This reduces the spread of disease. Plants benefit more from one deep watering than several light waterings that barely soak in. Soaker hoses or drip or trickle irrigation are better than sprinklers because they deliver water directly to the soil without wetting the foliage. Adding organic matter to the soil can help increase its ability to hold water for plants, especially in sandy soils. Mulch the soil to help it retain moisture.
Don't grow the same crop (or members of the same crop family) in the same place year after year. This can lead to a build up of pests and diseases. Plant winter cover crops such as rye in fall to protect and build soil overwinter. If you harvest an early crop and don't plant another one in its place, keep the soil covered with a summer cover crop, such as buckwheat.
Stay out of the garden when it's wet.
Weeds are easier to pull when the soil is moist, but let it dry out a bit after a rain before you work in the garden. Walking on wet soil can compact it. You can also inadvertently spread some diseases from plant to plant when they are wet.