A photocell works on the photoelectric effect: when light photons strike a photosensitive material (like selenium or silicon), they eject electrons from the surface. These ejected electrons create an electric current, directly converting light energy into electrical energy without any intermediate steps. This principle is used in solar cells, light meters, and automatic lighting systems.