Comparator using OpAmp. This can be used in different kinds of sensors.
Most of the sensors have variable resistances in different situations. Potentiometer gives that variance in resistance. You can replace the pot with a sensor.
When the inverting input is greater the LED is off and when the non-inverting voltage is greater the LED is on.