The speaker's imagination helps him to feel better about his separation from his friends, but we shouldn't neglect the healing power of time, either – especially when Coleridge goes through such great lengths to show us the passage of time. "This Lime-Tree Bower My Prison" contains a veritable sundial where the time can be told by the quality and direction of the light. His friends leave for their walk early in the afternoon, and they are gone all the way until sundown. You could create all kinds of symbolic and imaginative readings of the poem using the imagery of time and the setting sun. We'll give you some ideas in "Quotes."
The sunset symbolizes the end of one's life. The imagery at the conclusion of the poem shows that the speaker comes to terms with the "imprisonment" of death by viewing it as a part of Life.
The actual timeline of the day described in the poem is secondary to the imagined timeline that the speaker creates to give himself comfort.