Light sensors may be used in burglar alarms or inside garage door openers. Light shines between sensors, and if the something interrupts the light, the device knows an object’s there. In addition, they are also used in street lights to determine when it's dark enough for the light to switch on.
In the case of a burglar alarm, the light sensor constantly senses a beam of light from another part of the alarm. If a person or object gets in the way of the beam, the sensor knows senses the change in light and immediately sound the alarm. Garage door devices need a similar set up in order to make sure they don’t close on top of an object. If the light bouncing back from the ground is interrupted, then the garage door doesn't close to prevent damage.
Bar code scanners also use light sensor technology. The light in the scanner reflects on bar code, and then a sophisticated light sensor inside picks up on the patterns of light to translate the code into numbers and other data. Motion-sensing devices often have light sensors in them as well. Human beings give off infrared light, and many businesses use infrared sensors to automatically open their doors when someone approaches. A number of motion-sensing lights also use this approach.