To get water in the well, the depth of the well should be deeper than the water table in that region.
The water table distance from the surface is varied with the locality. It depends on the availability of the source like rain, soil type which means that the soil which has a higher percolation rate will have a high water table, etc.
Hence, when we did a well and the depth should be deeper than the water table for it gets water for a long time even in summers.