You can buy depth stops to attach to drill bits to make blind holes at a certain depth. But for occasional jobs you can gauge depth by using masking tape around the bit at the right depth. Or, as shown, drill through the center of a dowel section, using the bit you need for the hole. Cut the dowel so the exposed bit will be the depth needed for the hole.
To water vegetable and flower gardens containing tall plants that may otherwise block the spray, set sprinklers on a sawhorse, or use a tower-mounted sprinkler.