IR sensor for line follower not working in day light
You guessed it, sunlight has a lot of IR which is blinding your sensor. There are two common solutions for this problem:


Put a small cap on the sensor to provide a shadow.
Modulate your IR signal so that your sensor can detect an IR variation rather than fixed IR level.


For #2, you may want to look for components of IR remotes. There are IR receivers which have signal demodulation built in and there is plenty of IR transmitter circuits which modulate the signal for you. Common modulation frequencies are 38 and 48 kHz.