(i) Under forward biasing, the majority carriers in each side (i.e. holes in p-section and electrons in n-section) are pushed towards the junction. But the movement of electrons and holes across the junction is opposed by the potential barrier, hence the potential barrier across the junction decreases. It makes the depletion layer thin as shown in Fig.

(ii) Under reverse biasing, the majority carriers in each side are pushed away from the junction. The movement of holes and electrons across the junction is supported by the potential barrier, hence the potential barrier across the junction increases. It makes the depletion layer thick as shown in Fig.
