It's best to water in the morning. If you water in the middle of the day, much more of the water you apply evaporates, so it's wasteful. If you water in the evening, the plant's foliage may stay wet throughout the night and that creates an ideal environment for disease. So morning is best.
Most of your fruits and vegetables will thrive on one inch of water per week, although some crops, like melons, will use more water than that. There are two ways to deeply water crops without getting the foliage wet: Drip irrigation systems and soaker hoses. These systems take water straight to the roots, lessening the likelihood of disease on damp foliage.
Container vegetables have shallower root systems, so they'll need to be watered more frequently than vegetables planted in the ground—up container plants to 2-3 waterings a day, especially in dry, hot conditions. If the potting mix your vegetables are housed in is dry, take that as a sign that your vegetables need more moisture.
It's best to water deeply and infrequently rather than shallowly every day, so use a sprinkler rather than a watering wand. Set a rain guage out to measure how much water your sprinkler puts on the garden. If possible, water deeply with a sprinkler just once a week. Sometimes during the worst of summer's heat, you may end up watering twice a week. Mulch can help retain soil moisture.