The kanji 日 evolved from a drawing of the sun. The square represents the sun, and the line or dot in the center represents a sunspot or its radiating light.
Visualize 日 as the SUN. The square is the sun itself, and the line in the middle is a single, strong ray of light shining down.