One form of Vitamin A is part of the molecule in the rod cells of the retina that makes the response to light. If you aren't getting enough Vitamin A in your diet, one of the symptoms is poor night vision. Carrots are a good source of Vitamin A.
BUT if you're already getting enough Vitamin A, eating more carrots isn't going to improve your eyesight. In the Battle of Britain, Royal Air Force (RAF) pilots were publicly lauded for their excellent eyesight - which came from eating plenty of carrots! In fact, enemy planes were being shot down in greater numbers because the British had developed effective RADAR which they wanted to keep a secret.