This diagram shows how the sensors use LM358 IC. LM358 is a low-cost good quality dual operational amplifier IC that is used as a comparator in the circuit.
The circuit is a dark sensor; that will show visual indications by activating an LED and Relay,

The working of the circuit is simple, when the photoresistor or LDR receives light it will switch on the transistor BC337(NPN), when the transistor becomes ON it will activate the relay switch and any equipment connected with the relay will become activated. The relay value should be used according to the operating voltage. It is also important to always check how many amperes your relay can handle and how many amperes your appliance will use. Let's say your appliance's working ampere is 8 and you are using a 10-ampere relay then it will run smoothly but if your appliance current consumption is up to 10A then you have to use a higher current handling relay switch. The ampere of the relay and operating voltage are always written on the relay.