How is a diode different from a piece of ordinary wire? — R
An ordinary wire will carry electric current in either direction, while a diode will only carry current in one direction. That’s because the electric charges in a wire are free to drift in either direction in response to electric forces but the charges in a diode pass through a one-way structure known as a p-n junction. Charges can only approach the junction from one side and leave from the other. If they try to approach from the wrong side, they discover that there are no easily accessible quantum mechanical pathways or “states” in which they can travel. Sending the charges toward the p-n junction from the wrong side can only occur if something provides the extra energy needed to reach a class of less accessible quantum mechanical states. Light can provide that extra energy, which is why many diodes are light sensitive—they will conduct current in the wrong direction when exposed to light. That is the basis for many light sensitive electronic devices and for most photoelectric or “solar” cells.