The Prophet (peace and blessings be upon him) said: “Whoever believes in Allah and the Last Day must not harm his neighbor,” or words to that effect.
There is no doubt, then, that the neighbor possesses a right over the one who lives beside him—that he be treated with kindness.
As for what you have mentioned, namely that your neighbor is committing major sins and drinks wine, it is incumbent upon you to advise him, censure him, instill in him fear of Allah, and admonish him. Tell him that so long as he professes faith in Allah and the Last Day, he must repent to Allah from these sins, these ruinous, grave offenses. You are required to go on counseling and reminding him, hoping that Allah will guide him through you. He has a right over you, and that right is all the more emphatic because he is your neighbor. Therefore you must counsel him, exhort him, and remind him. If he persists and does not repent, then shun him for Allah’s sake—refrain from speaking to him or sitting with him—until he repents to Allah, exalted is He.
If, however, he does cause you personal harm, you should bear the neighbor’s harm with patience and repay it with kindness, for meeting evil with good is one of the hallmarks of the people of faith and something Allah has enjoined. Together with the advice and admonition already mentioned, if circumstances call for you to boycott him—by avoiding conversation and companionship with him—then do so; perhaps that will deter him and become a means for his repentance, all the while you remain patient with whatever harm he causes you. There is no doubt that the neighbor has a right over his neighbor, and Allah’s help is sought.