Decide on the form your sonnet will take. There are two sonnet forms, the Shakespearean and the Petrarchan. Both have 14 lines, but the endings differ greatly. In a Shakespearean sonnet, the poem ends with a couplet, which is two lines that rhyme with one another, but not necessarily with the preceding lines. In a Petrarchan sonnet, the last six lines of the poem act as the ending, or as some might describe it, the "answer".
Conclude with a bang! Sonnets are emotional and intense, and their ending lines should be like a grand finale. Consider this when writing. You want your most powerful words to be last, so if you have something special in mind, try to hold out to the end.
Remember that sonnet endings almost always rhyme. Unless you are working with experimental poetry or post-modern form, it is important to respect this aspect of sonnets and be true to the poetic form.
Use end-rhymes. The last words in the line are the rhyming ones. In a Shakespearean sonnet ending, the last two words on the last two consecutive lines will rhyme. In a Petrarchan sonnet ending, the third-to-last line's last word and the final line's last word will rhyme.
Summarize the theme of your sonnet in your ending. If you haven't already made it clear what your sonnet is about in the preceding lines, make sure you clarify in the sonnet's end. The finale should strengthen your sonnet, not weaken it.
Read your sonnet ending aloud. Does it sound like it belongs? Does it do a good job of fitting in with the rest of the poem, while also standing alone? Read it aloud several times, read it on the page several times, and ask a friend to read it aloud to you. This will be helpful when trying to decide if it's an appropriate ending.