Another possible problem with tomatoes setting fruit is temperature. Tomatoes normally won't set if the night temperature is below 50 due to sparse pollen production. They also won't set when nighttime temperatures are above 75 degrees F and daytime temperatures are above 95 degrees F with dry, hot winds. Under such conditions, fertilization is not completed and no fruit develops. However, cherry tomatoes may be more forgiving of high temperatures than the larger slicers and will often set fruit in the heat.
Squash, cucumbers, watermelon, and muskmelon can have a couple of other problems. First, the early flowers on these plants are usually all male. The production of both male and female flowers becomes more balanced as time passes. You can easily tell the difference between the two because only the female flower has a tiny fruit behind the blossom. If you have both, have not over-fertilized, and still have a problem, make sure you have pollinators.
Look for the presence of bees visiting the plants. If you don't see any, try hand-pollinating several flowers. Use a painter’s brush to transfer pollen from the anther of the male flower to the stigma of the female flower. If you get fruit on only those flowers you pollinated, you need more pollinators. Make sure you aren't killing them with overuse of insecticides. If you must use an insecticide, spray near dusk when the flowers have closed. (Ward Upham)