From the number of times the speaker mentions moonlight (nineteen!) it starts to look like an obsession. He's always zooming out, reminding us of the natural world that is framing this human drama. The natural world gives "The Highwayman" its atmosphere, its sense of exaggerated reality. It's a major part of how the whole thing fits together.
It is the presence of the natural world and the way it is used that gives this poem its shape and intensity. It is what turns a simple story into an effective poem.
The emphasis on natural beauty allows the speaker to turn a depressing and violent story into the kind of pretty little poem that makes everyone feel good.