Whether he has a reason isn't the point, lol. You don't show up uninvited and knock on a woman's door.
It's not just "a woman", it's his neighbor.
Generally speaking, I don't care for anyone knocking uninvited on anyone's door.
But I see nothing wrong with knocking on a neighbor's door if you have a reason, especially if you don't have their number.
Like "Hey, I'm having a party tonight, thought I'd invite you if you'd like to come". I don't see anything wrong with that, whatsoever. It's friendly.