"Anne Hathaway" uses alliteration to add emphasis and lyricism to its language. Alliteration, consonance, and assonance all work together to signal that this is a work of poetry rather than prose. This is an important distinction: Hathaway herself implicitly deems her loving relationship with Shakespeare the stuff of poetry while dismissing the drab, "dribbling [...] prose" of visiting guests. Fittingly, then, moments of alliteration give the poem a kind of electric crackle and spark, hinting at the passionate nature of the couple's relationship.
Take line 2, for example, where the bright, crisp /c/ and /t/ sounds of "castles, torchlight, cliff-tops" make these imagined worlds seem all the more vivid on the page. Later, the flitting /t/ sounds of "touch" and "taste" have a sensuous tenderness to them, perhaps evoking the delicate hands of a lover.
Some of the most striking examples of alliteration occur in the last three lines, ramping up the poem's music and emotion as things come to an end. Hathaway calls Shakespeare her "living laughing love," for example, the triple hit of alliteration adding intensity and drama to this description.
The alliteration in lines 13 and 14 then highlights the chiasmus of the poem's final moments:
I hold him in the casket of my widow’s head
as he held me upon that next best bed.
The two images here ("I hold him," "he held me") mirror each other, reflecting the enduring bond between Hathaway and Shakespeare; just as he held her in life, so she will hold him in death. The poem then closes with a final, powerful punch of alliteration: the bold /b/ sounds (and /eh/ assonance) of "best bed" end things on a memorably musical note.