Shakespeare is comparing the inspiration for his sonnet with the most perfect and beautiful of nature's creations, the summer's day. In the extended simile
Shakespeare compares the object of his affections with the temporary appeal of the summer. He decides that 'summer's lease hath all too short a date:' meaning it is brief and transient, unlike the 'eternal summer' of his affections.
He also observes that her beauty is preserved by his words - a feature typical of poets writing at the time whose verse was often used to immortalise their patrons - in the final rhyming couplet
So long as men can breathe or eyes can see,
So long lives this and this gives life to thee.