The theme of Shakespeare's sonnet #18 is similar to that of many of his other sonnets. The gist of it is that he is making his loved one immortal because he is confident that his own poetry is immortal. So far he has been correct in his belief. His sonnets are known and loved all over the world after over four hundred years.
In sonnet #18 he plays with the idea of comparing his loved one to a summer's day. He disparages summer because, for one thing,
Thou art more lovely and more temperate
He reflects that summer does not last long
But thy eternal summer shall not fade,
Nor lose possession of that fair thou owest;
Nor shall Death brag thou wander'st in his shade,
When in eternal lines to time thou growest;
"...fair thou owest" means "the beauty you possess." "Owest" meant "own" in Elizabethan times.
Another great sonnet which has the same theme is sonnet #55, which begins with the following lines:
Not marble, nor the gilded monuments
Of princes, shall outlive this powerful rhyme,
But you shall shine more bright in these contents
Than unswept stone, besmear'd with sluttish time.
Here again Shakespeare is promising to immortalize his loved one in his immortal poetry. By "these contents" he of course means the contents of the sonnet he is composing.
Another great sonnet which deals with the same theme is #19, which begins with the startling line:
Devouring Time, blunt thou the lion's paws
This sonnet ends with a couplet expressing Shakespeare's familiar theme that he will immortalize his loved one in his poetry:
Yet, do thy worst, old Time, despite thy wrong,
My love shall in my verse ever live young.