Poetry is the art of words and rhythm, and punctuation plays a key role in creating rhythm. In much of contemporary poetry, traditional meter has taken a background to free verse experiments, and the role of punctuation in verse has become less traditional and more prose-like. For those who want to write sonnets, mimicking Shakespeare's for instance or writing contemporary poems in the form, punctuation doesn't often come as naturally as that of a free verse poem or a prose sentence. It can, however, be learned and, with a little practice, mastered.
Punctuate minimally according to the syntax of the poem. Add periods where sentences end and commas according to conventional comma rules, separating adjectives, lists and contracted sentences. Read the sonnet through out loud a couple of times as though it were prose to double check the initial punctuation placement.
Add a comma at the end of each line that doesn't already have punctuation. This is rarely a good punctuation for a finished poem, but in the case of the sonnet, it's a good start to treat each line separately at first. Read the poem aloud as verse, and note which of the line-ending commas seem appropriate.
Erase any of the line-ending commas you added that seem inappropriate. When a line ends with no punctuation and the sentence spills onto the next line unhindered, it's called enjambment. Poets have described the effects of this technique many ways, but many agree that the sound produced is a heightened pace, and a focus on the first words of the next line.
Experiment with different punctuation, reading it out loud with each new arrangement. Consider replacing periods with semicolons at the end of lines for a less dramatic pause. Steps 1-3 set up a good framework, but there is no correct answer to sonnet punctuation. Punctuation can add another level of meaning and finesse if done well.