The search for truth has often been a tension between reason and emotion. Many feel that reason by itself can bring us to knowledge, but not to truth. For Wordsworth, nature speaks to us of the Divine without the intervention of reason; it is, in the Transcendentalist's sense, intuition rather than tuition. When he beholds the rainbow, Wordsworth doesn't see the droplets of water breaking down sunlight into its spectrum of colors; he perceives the Divine in what he sees.
I have always thought that the closing lines of "Ode on a Grecian Urn (Keats) best summarizes the Romantics' search:
'Beauty is truth, truth beauty,—that is all
Ye know on earth, and all ye need to know.'
William Wordsworth was a Nature poet who worshipped Nature as his God. For Wordsworth, Nature was his main source of spirtual comfort and escape from all the cares of this world. His association with life giving and life sustaining Nature began even when he was only a child and remained with him till his death.
In this short lyric, the 'rainbow' symbolizes the life sustaining and life nourishing goodness of Nature. The sight of the beautiful rainbow which he saw when he was only a child is deeply etched in his memory and the same joy that he experienced when he saw it as a child contiunes to remain with him through his adulthood. He desires that this same childhoood joy should continue to sustain him even in his old age. Wordsworth says that it would be better to die than not being able to experience the same joy that he experienced when he saw the rainbow when he was a small boy after he becomes an old man.
The memory of the beautiful rainbow and its pleasant associations form the link between his childhood, adulthood and his old age.