We will use LDR to sense the light and rotate the servo motors connected to circuit, to move the solar panel direction towards to light source.

Here LDR’s are working as light detectors to detect the light source. Two LDR’s are placed at the two sides of solar panel and a servo motor is used to rotate the solar panel. The servo will move the solar panel towards the LDR whose resistance will be low, mean towards the LDR on which light is falling, that way it will keep following the light. And if there is same amount of light falling on both the LDR, then servo will not rotate. The servo will try to move the solar panel in the position where both LDR’s will have the same resistance means where same amount of light will fall on both the resistors and if resistance of one of the LDR will change then it rotates towards lower resistance LDR. 

You can watch the working video on youtube, for code and detailed DIY guide check this tutorial here.