Comparing the sun to a loving grandmother, I realized the author's feelings.

It expresses the author's praise for the sun, whose dedication to the earth is like a loving mother.

This is a figurative sentence. Comparing the sun to a loving mother gives people an image and a concrete feeling, which highlights the author's admiration for the sun.

Ai Qing's anthology To the Sun was written in the spring of 1937. At that time, he was wandering on the beach shortly after he got out of prison. Pursuing light is Ai Qing's life goal. This poem "The Sun" is his earliest poem about the sun.