Alliteration is a prominent feature of "When We Two Parted." Even the title alliterates with its two /w/ sounds! In most instances, the alliterative sounds come as a pair. The poem is all about a relationship between two people—a couple—and the alliteration is often coupled too. This is almost like a kind of painful joke for the speaker, with the actual sound of his words subtly showcasing his fixation on his previous relationship. The paired words in each instance of alliteration highlight the fact that the speaker himself is no longer part of a couple.
Additionally, these instances of alliteration sometimes emphasize the conceptual connection between two words and reinforce their meaning in the lines. In lines 5 and 6, for instance, the alliteration between "cold" and "colder" intensifies the sense of a chill running through these two lines.
In line 16, the alliteration of "share" and "shame" also makes the line more dramatic, with the shared sounds conveying the way in which the speaker himself "share[s]" the bad feeling about his ex-lover.
Alliteration in lines 25 and 26 joins "secret" with "silence." This informs the reader about the nature of the discussed relationship. Clearly, it was some kind of affair or illicit union, and the conceptual link between secrecy and silence speaks to the way that the speaker can't seem to let go of his bitterness—perhaps because he can't mention it out loud.
This alliteration specifically is part of the sibilance that echoes throughout lines 25 to 28, with "secret," "silence," "spirit," and "deceive." On the one hand, the /s/ sound is associated with hushed whispering—and, as such, seems appropriate here given that the speaker is talking about conducting the affair and grieving in silent secrecy. But sibilance is also associated with a kind of snake-like hissing. Snakes are symbols of evil and deception—think of the Garden of Eden—and as such the sibilance here subtly reinforces the idea of the speaker's lover as a sinful and deceptive.