The sonnet opens with the question "Shall I compare thee to a summer’s day?" The subsequent 13 lines do, in fact, compare the beloved to a summer's day; thus, the question is answered affirmatively.
At first, the sonnet appears to be following common Petrarchan conventions of praising the beloved. A summer day is something most people find pleasant, and Shakespeare explores ways in which his beloved is even more delightful than a summer day. He does this by denigrating the summer, arguing that some days in the summer are uncomfortably hot, while others are chilly and rainy (especially in England).
He next argues that, although individual summer days and summer itself are fleeting, the beloved's beauty will last forever. At first, this appears paradoxical, as we know that people grow old and die. The final couplet resolves this by saying that the beloved's beauty will be immortalized in his sonnet and therefore will endure as long as people read.