One of the big surprises of recent research is the importance of how increased time spent outdoors helps in preventing myopia. At the present time it appears that 14 hours a week or more outdoors are significantly effective in reducing myopia progression.
We don't know. There are many possibilities and studies are under way to help determine what is happening.
We do know that it is not sports or physical activity. The benefit happens for children playing outdoors with no organized sport activity.
"Outdoor activity" presents a complicated, broad area of research. An example of unexpected findings about outdoor activity is that exposure to the common soil bacterium Mycobacterium vaccae is believed to have anti-depressant qualities and has been shown to increase learning behavior. (news report link of American Society for Microbiology) It increased serotonin levels in the brain. Serotonin is part of the signaling system within the retina controlling eye growth. While no one has studied the possible connections to myopia control, the results indicate the complexity of trying to find exactly what outdoor time does to control myopia.
The outdoor benefit is not due to children outdoors reading less. Outdoor children do better regardless of their indoor reading activity. This means that it is not the "bookworm", the child who reads a lot, who is more likely to become nearsighted. It is the child who doesn't go outside, whether they are a reader or not.
Perhaps the greatest risk is premature aging of the skin and skin cancer due to increased exposure to UV light from the sun. Sunscreen lotions may prevent sunburn but do not protect well against skin cancers. Sunlight can also increase the risk of cataracts. Due to these factors, many people wear sunscreen on their skin and sunglasses on their eyes. Whether these actions negate or reduce the beneficial effect of being outdoors is not known.