A diode is an P-N junction device in the forward bias it acts as an close switch, as the depletion region is very small but as it is in reverse bias then the P-region is connected to the -ve terminal of the battery, while the N-region is connected to the +ve terminal of the battery. Hence the -ve terminal of the battery attracts all the holes while the +ve terminal of the battery attracts all the electrons and hence the value of the depletion region is high and hence it acts as an open switch.
rate if useful