The poem begins with a type of personification known as pathetic fallacy, as the speaker suggests that clouds "brood" over the shoreline. To "brood" means to think deeply about something that is usually unpleasant or troubling. The fact that the speaker uses this word to describe the clouds suggests that the speaker is projecting the speaker's own troubled emotional state onto the surrounding environment, perhaps because the dark clouds look intimidating.
Of course, clouds can't actually "brood," but this characterization suggests that they're discontent and maybe even angry. As such, the clouds themselves come to seem threatening, as if they're moody and ill-tempered.
The speaker goes on to personify the night, describing it as "mute"—meaning that it doesn't speak. The speaker casts the night as a silent presence that sneaks in and "settles" over the ocean. Combined with the moody clouds above, the idea that the night is so silent feels oddly disturbing, since its approach is quiet and unassuming even though everything suddenly becomes dark. Personification thus accentuates the foreboding quality of the speaker's immediate surroundings, presenting both the clouds and the night itself in ways that feel intimidating and mysterious.
The speaker uses personification again when characterizing the waves in the ocean as "drowsy." The idea that the waves are sleepy and slow evokes the gentle rocking motion often associated with the ocean. In this way, then, the speaker uses personification not just to imbue the setting with a sense of foreboding, but also to more vividly describe the ocean, which rolls steadily along.
Lastly, the speaker considers human reason at the end of the poem, calling reason itself "wavering" and saying that it "lends" a "dubious ray" of light to illuminate "life's long darkling way." According to this idea, reason itself is untrustworthy and inconsistent. The metaphorical "ray" of light that reason gives to people on their journey through life cannot be counted on to lead the way through darkness. By personifying reason as an unreliable entity, the speaker makes it clear that trying to make sense of life using logic and critical thinking is often like using distant ship lights on the horizon to navigate through the night.