This is how a solar cell works. The silicon wafer has an electron rich (n) layer and an electron poor (p or hole) layer. A photon of light energy is absorbed by the silicon semiconductor, and if it has sufficient energy, a stable electron is excited to form an electron/hole (positive charge) pair, or exciton. Under the right conditions, the charges are separated and the free electron flows through the circuit, creating current. Meanwhile another electron flows from the circuit back into the hole layer, where it recombines with the original hole that was created.