Why is Nick Valentine tolerated in Diamond City?

If you travel with Nick as a companion, you'll get dialog sections (just like with any other companion). In one of them he'll tell you about it:

Nick saved the kidnapped daughter of the mayor, and afterward the mayor sided with him, allowing him to stay in Diamond City even though the population didn't trust him at first. Eventually, they got used to it.


Nick is also an older style synth, and no one will mistake him for someone else, or for being human.

The real opposition in Diamond City is the unknown Synths who are masquerading as human.