Remember that a sonnet is a poem designed around form. Each sonnet you encounter will be comprised of a single stanza running for only 14 lines.
Read the sonnet through several times to make sure you understand the poem's meaning before you begin committing it to memory. Your ability to remember will be greatly enhanced by your comprehension of the text.
Determine the sonnet's rhyme scheme. Think of the jingling sound at the end of each line as an anchor that will draw you to it should you start to feel you can't remember the exact words.
Figure out the metrical design of the sonnet. Like the rhyme, this is a sound of stressed and unstressed syllables within each poetic line that will be regularly and predictably repeated throughout the poem.
Memorize the poem in 3 blocks of 4 lines and a final block of 2 lines. This is helpful because most sonnets have interrelated themes within these specific line groups.
Give yourself plenty of time to make sure the poem easily comes to mind. Putting too much pressure on your powers of memorization can cause unnecessary stress and increases the chances of forgetting what you already know.