Aldous Huxley was taken in, unfortunately: https://en.wikipedia.org/wiki/The_Art_of_Seeing
I would guess it's dangerous nonsense, though there are plausible claims that shortsightedness is associated with not spending much time outside as a child so perhaps there's a slight link with something that isn't nonsense.
AFAIK that has nothing to do with the sun but rather with looking at things at a larger distance than at home.
An obvious thing perhaps worth mentioning: if you're shortsighted (or longsighted) then you see better in bright sunlight because the iris closes, giving you greater depth of field, so that might make people think/feel that sunlight "cures" myopia.
(On the other hand, if you have excellent eyesight then you see better in less bright conditions because your vision is being limited by diffraction at the aperture.)