This device works on the principle that the electrons are activated from lower energy state to higher energy state as of the energy addition from sunlight.
This activation will in turn create number of holes and free electrons in the semi-conductor thus giving electricity.