In an intrinsic semiconductor material like silicon, the electrons are held onto the atom strongly enough that the material is normally an insulator.
A photon with enough energy can excite an electron up into the conduction band where it is more free of the atom and can move through the material carrying a current.
The more light, the more free electrosn, the more current and th elower the resistance.