In Shakespeare's Sonnet 18, he is asking a rhetorical question. "Shall I Compare Thee to a Summer's Day" is the question. In this rhetorical question, he proceeds to compare his beloved to a summer's day. His tone is endearing, evoking affection from his beloved and the reader. He writes a beautiful poem that capture's his beloved's beauty.
The mood leaves the reader with such optimism. The poem is refreshing. There is such a delightfulness in the poem. There is a magic quality as his beloved takes on an immortal beauty. His beloved will live on forever. Immortality shall render his loved one as a youth with beauty that shall not fade.
Clearly, the poem has an immortal quality for audiences still enjoy the sonnet. The speaker's beloved has escaped death in the unending verse of Sonnet 18.
"Sonnet 18" is an interesting sonnet by way of tone. The reason for that is because I think that the poem carries two distinct tones and moods depending on how it is read. The first is a light, airy, and happy tone. The speaker of the poem is trying to compare his lover to a summer's day. Summer days are nice; therefore, the comparison feels apt. Along with the rhyme, rhythm, and meter, the overall mood simply feels peaceful. I do think that is the unintended tone and mood though.
When a reader looks closely at the words of the poem, the reader realizes that the poet is expressing frustration at the inadequacy of the chosen metaphor. He doesn't like the idea of comparing his love to a summer's day, because he feels that she is so much more than a mere summer's day. Plus, unlike a summer's day, her beauty will last on forever. With that interpretation is mind, the tone is closer to ironic and frustrated, which in turn carries over to the mood of the sonnet as well.
Sonnet 18 is a complex sonnet and, at one level, it is as described in the answer above. The tone of its opening quatrain is, indeed, optimistic but, equally frustrated by the constraints of the sonnet tradition and its use of stock comparisons, to express a love which the lover seems to surpass. Thus, in the opening two lines, ('Shall I compare thee to a summer's day?/Thou art more lovely and more temperate') The mood is as much frustrated at the inability of nature to match the delight of the lover as it is optimistic.
However, the tone of the poem is, for all of its delight in the wonder of the lover, also suffused with irony in so much as it is also a demonstration in the problems of writing about love and about the power of the written word. Much as the opening Octave is all about the lack of suitable comparisons to truly express the beauty of the beloved, the end of the poem is very different. For all of the seeming changeability and transience of natural beauty, the poet in the sestet claims that death will not 'brag' that the lover 'wander'st in his shade' because the poet has captured this ethereal beauty in the 'eternal lines' of his poem. This poems is doubly ironic in this sense: at one level, the poet has just spent a good deal of time complaining of the inability of language to express the beauty of the beloved only now to claim that he has trapped them in 'eternal lines'; at another level the irony of the poem might be that the poet is as enamoured of the creature that he has conjured in his own mind, the overly romantic image of the beloved that he has trapped in these 'eternal lines' as he is in the lover who, of course, will fade away just like 'a summer's day'. Thus, while the poem might be read as sincere in tone, it is also undercut by self-consciousness and irony.