Optical sensors convert light rays into an electronic signal. They measure light and translate it into a reading on a measuring device. Optical sensors are integral to many everyday devices, including computers, alarms, barcode scanners and copy machines.