How are solar cells used?
As a photodetector that converts light directly to electricity.
They are used as a photodetector (i.e. infrared detectors), detecting light or other electromagnetic radiation near the visible range, or measuring light intensity.
They are usually used to create electricity and, generally, energy by converting light energy directly to electric energy.