Function of Weep Hole
Weep Holes are provided in earth retaining structures like retaining walls, underpasses, wing walls and other below ground drainage structures. From engineering point of view, Weep Hole is provided in these structures to relieve hydrostatic pressure or water pressure on the walls. Reducing the water pressure on the walls will reduce the structural design demand of the water or earth resisting wall by reducing its thickness as well as reinforcement requirements.

Additionally, weep holes also reduces the buoyancy and uplift on the structures making it possible to construct lighter structures without any uplift relater stability issues.
How does Weep Holes help
Let us find out how this works. If a structure is above water table, or there is no possibility of water collecting behind the wall, the earth pressure that can act on the soil will be based on the saturated unit weight of the soil under active, passive or at-rest condition. When the structure is below water table, the unit weight of soil considered is submerged weight. Though the submerged density of soil is lesser than saturated soil weight , thus lesser pressure, there is an additional water pressure acting on the structure whose net effect is more than saturated pressure alone.

For example under active pressure condition if the coeff. of earth pressure is 0.33, for saturated, above water table case total earth pressure is
Total Pressure = 0.33x saturated unit weight x height.
Whereas for below water table or submerged condition total pressure acting on the wall is

Total Pressure = 0.33x submerged unit weight x height + weight of water x water-table height.
Thus, by providing weep holes the effective height of water table and water pressure is reduced thereby reducing total pressure on the wall.

Total Pressure = 0.33x submerged unit weight x height + weight of water x weep-hole height.
Weep holes are provided using sand or gravel drains to ensure proper functioning of these holes. The number of holes provided depends on the size of structure and height of water table. The Height at which weep hole is provided depends up on the maximum possible height of water accumulation or natural ground water-table.

Apart from this, there are different types of weep holes which are provided in brick masonry. Primary function of these kind of weep holes are to provide ventilation for internal cavity walls and drainage to prevent damage due to capillary action and condensation in areas with heavy rainfalls.