In Robert Frost's poem "Mending Wall," the neighbor twice says, "Good fences make good neighbors." In the poem, the speaker and the neighbor meet to repair the wall between their properties. The speaker wonders why they even need a wall; they have only trees on either side, and trees aren't going trespass onto each other's property.
The speaker mischievously considers questioning his neighbor and making him explain his statement, but ultimately they both just continue to repair the wall, and the neighbor repeats his statement: "Good fences make good neighbors."
As you might expect in poetry, the motto means more than the literal. The statement is about the figurative borders or boundaries we put up between ourselves and other people. In every relationship, we are most comfortable and happy when we know and abide by "fences" in the relationship. An easy illustration would be the relationship you have with brothers or sisters in your home. As long as they stay out of your room, don't touch your belongings, and don't bother you when you are busy, you can probably get along just fine. That is the "fence" or boundary that you need in order to get along. The "fences" or "walls" needed in each relationship are different, but most people would agree that "good fences make good neighbors."