This is "The Day the Sun Came Out" by Arthur C. Clarke.
Plot: On a planet orbiting a red dwarf, sunlight appears only briefly every few years. Children lock a boy, Harvey, in a shed as a prank. A sudden solar flare causes the sun to shine intensely for hours. Harvey, alone in the shed with a window, witnesses the miraculous event—transforming him—while the others miss it.
Themes: isolation, wonder, perspective, the cruelty of children, and the transcendent power of nature.