Geckos lick their eyes because Geckos lack eyelids.
So the geckos use their tongues to clean the transparent scales called spectacles which protect their eyes.
The spectacles that protect the geckos eyes act like windshield wipers to remove debris and keep their eyes clean and moist.
Most geckos cannot blink so instead they rely on their tongues to clean their eyes.
The spectacles which are transparent scales cover the geckos eyes and can collect dirt, which is why the gecko needs to lick their eyes to keep them cleaned.
When a gecko licks it's eyes, the geckos saliva helps loosen and remove any debris from the spectacle.
Geckos can't blink because they don't have any eyelids.
The same is true with snakes who have their eyeballs also covered with spectacles.