Wordsworth weaves together all three concepts-childhood, memory, and our pre-existence-in his poem to create a message of how children, having come straight from the presence of God, retain some of that heavenliness about them and can remember bits of that; however, as time goes on, they lose that memory of God and heaven, and eventually are fully immersed in the world of men. Wordsworth mourns this loss of our pre-existence with God; he feels that children are the closest to God as a result, and that men should look to children for wisdom because they still retain that heavenly memory.
He starts the poem off in stanza I on the theme of that heavenly memory; he says that "there was a time" when he could see heaven in all of nature around him, but now "the things which I have seen I can see no more," meaning, that memory has faded with age and time. In stanzas III and IV he goes on to describe how he feels that children still hold that memory of "a glory" from God; he feels that "the heavens laugh with" the children because they can still remember. In stanza V he elaborates, saying that when we are born, we forget where we came from; we come "trailing clouds of glory...from God." He continues by saying, "Heaven lies about us in our infancy" only to have "man perceive it die away".
I don't have room to go on and on through each stanza, but the message is the same, and it is throughout the entire poem. He feels that when we come to earth, we lose our memory of our premortal existence with God. He feels that glory of being with God is lost. Children embody the memory of that glory, but the harsh realities of this world soon "imprison" our hearts and make us forget the beauties and joys of living with God. He mourns this loss of memory throughout the entire poem, and longs to have it back.