Rights of the Neighbors

Allah ordained in the Glorious Qur'an:

Worship Allah and join none with Him in worship, and do good to parents, kinsfolk, orphans, the poor, the neighbor who is near of kin, the neighbor who is a stranger, the companion by your side, the wayfarer (you meet), and those (slaves) whom your right hands possess. Verily, Allah does not like such as are proud and boastful.

Islam classifies neighbors into three categories, which are as follows:

A relative neighbor. This type of neighbor has three rights over you: the right of kin, the right of neighbors and the right of Islam.

A Muslim neighbor has two rights: the right of a neighbor and the right of Islam.

A non-Muslim neighbor enjoys the right of being a neighbor. Abdullah bin Omar , came home once and found that his family members had slaughtered a sheep. He immediately asked: "Did you offer some of the sheep's meat as a present to our Jewish neighbor?' for I heard Allah's Messenger saying,

Angel Jibreel (u) continued to advise me to be kind to my neighbor until I thought that he was going to give him a share in inheritance.
Tirmidthi, Hadith no. 2007.

Causing inconvenience to the neighbor is against Islam. The Prophet said: "By Allah he does not believe, by Allah he does not believe, by Allah he does not believe! It was said: Who O Messenger of Allah? He said: "The one whose neighbor is not safe from his harm.Bukhari, Hadith no. 5670.

It is reported that Allah's Messenger illustrated the rights of a neighbor as follows:

Do you know what are the rights of a neighbor? [They are as follows], If a neighbor seeks your help, extend it to him. If a neighbor asks you for a loan, lend him [if you have it.] If your neighbor becomes poor, then help him financially and attend to his poverty if you can. If your neighbor becomes ill, then visit him [checking on his health and well-being.] If your neighbor is happy on certain gain, then congratulate him. If your neighbor is suffering a calamity, then offer him condolences. If your neighbor dies, then attend his funeral [if you can.] Do not raise your building over his building, so that he would have no sun exposure or wind passage. Do not bother your neighbor with the smell of your cooking, unless you intend to offer him some [of the cooked food].
Tabrani, Hadith no. 1014.

Even when the neighbor causes harm, good behavior is advised. A man complained to Abdullah ibn "Abbaas: "My neighbor harms me and curses me! So he said to him: "He disobeyed Allah in your affair, so go and obey Allah in his affair.