A metaphor is the wall, which not only physically but emotionally and socially separates the neighbors.
Metaphor is the use of direct comparison, where the author compares two unlike things by saying they are the same. It usually uses a linking verb such as is or was.
In this case, the wall is a metaphor. We often talk of putting up emotional or mental walls between us and other people. These protect us, and prevent us from getting close to others. In this case, the neighbor seems to think that neighbors are better off not knowing each other very well. Yet the speaker feels uneasy about it
I let my neighbor know beyond the hill;
And on a day we meet to walk the line
And set the wall between us once again.
We keep the wall between us as we go.
The speaker does not see a reason to keep the wall there, mentally or physically. He thinks that there is no reason for separation. Maybe they could be friends, or get to know each other. Why do they have to stay apart? He would prefer more closeness, and to leave the wall alone, both literally and figuratively.