Shakespeare wrote "Sonnet 18" to commemorate and preserve his lover's youth and beauty and make them last forever; by comparing his lover to a warm and pleasant summer's day, Shakespeare showcases that his beloved is gentler and much more beautiful than summer. In this context, summer symbolizes the fair youth's incredible beauty and his gentle character. Shakespeare extends this metaphor throughout the sonnet and uses several nature references and allusions to symbolically portray the passage of time, as well as life and death.
For instance, the line "Rough winds do shake the darling buds of May” invokes images of late spring and early summer; this line symbolizes birth or the beginning of the life cycle, as everything blooms in spring and gets ready for summer.
"And summer’s lease hath all too short a date”: in this line, summer refers to the lover's youth. "Sometime too hot the eye of heaven shines, And often is his gold complexion dimm’d": with these two lines, Shakespeare uses the symbol of the sun—"the eye of heaven" and its "gold complexion"—to point out that youth and beauty are not eternal and that they fade, perhaps a bit too quickly.
“And every fair from fair sometime declines, By chance or nature’s changing course untrimm’d": these lines symbolize autumn and change; as leaves turn red and brown, people turn old and gray and their appearance and character are not as vibrant or as lively as before.
The line "Nor shall death brag thou wander’st in his shade" symbolizes death and mortality.
Shakespeare's lover, however, defies nature and transcends natural law; his beauty and youth, more captivating than a summer's day, will never fade and will live on forever, as Shakespeare immortalizes his lover with his words, enabling him to live forever and be eternally young and beautiful in his verse.