Carrots do have some vitamins important in vision, but so do almost all richly coloured vegetables. Don't over eat them though, they can turn your skin orange if you overindulge.
Also, they aren't a magic cure for refractory problems, which are caused by the shape of the eyeball not focusing the lens on the back of the eye. Aging eyes can get stiff lenses, and you need reading glasses. The only way to correct for these various focusing issues is lenses, to correct for the defect.
Squinting or pressing on your eyeballs can temporarily change the shape of the eye and improve your vision, but no amount of exercising the muscle will lead to anything permanent. Some people will recommend the "Bates Method", but is doesn't work. This has been shown in many studies.
Watching too much or sitting too close to the TV has not been shown to have any negative impact to vision in studies, despite what our moms always said. Same goes for computers.