Ruling on praying against an annoying neighbour
Question

I have neighbours who annoy me by playing music all day long, and I cannot recite Qur’an or study. It is so bad that in order to sleep I put my fingers in my ears. For certain reasons, I stay at home and I only go out to pray or when I need to. Am I allowed to pray against them, asking Allah, may He be exalted, to afflict them with a calamity? But I fear that the supplication may rebound on me. Please note that I have lost patience, and we have moved more than once previously because of annoyance caused by neighbours, then we moved to this new house and found the same problem.
Praise be to Allah.The one who is wronged has the right to pray against the one who has wronged him.
This is mentioned in the hadith of Ibn ‘Abbas (may Allah be pleased with him), which says that the Prophet (blessings and peace of Allah be upon him) sent Mu‘adh to Yemen and said: “Fear the supplication of the one who has been wronged, for there is no barrier between it and Allah.” Narrated by al-Bukhari (2448) and Muslim (19).
It was narrated from Abu Hurayrah that the Prophet (blessings and peace of Allah be upon him) said: “There are three supplications that will undoubtedly be answered: the supplication of a father, the supplication of a traveller, and the supplication of one who has been wronged.” Narrated by Abu Dawud (1536) and by at-Tirmidhi (1905), who said: This is a hasan hadith.
But it should be a supplication in which there is no overstepping the mark and no transgression.
Shaykh Ibn ‘Uthaymin (may Allah have mercy on him) said:
As for the supplication of one who has been wronged, what is meant is that if someone wrongs you, then if you pray to Allah against him, Allah will answer your supplication. And even if the wronged person is a disbeliever, and you wrong him then he prays to Allah against you, Allah will answer his supplication, not out of love for the disbeliever but out of love for justice, because Allah is just and the score must be settled with the wrongdoer for the one who has been wronged and justice must prevail. Hence when the Prophet (blessings and peace of Allah be upon him) sent Mu‘adh to Yemen, he said to him: “Fear the supplication of the one who has been wronged, for there is no barrier between it and Allah.”
So the supplication of one who has been wronged will be answered if he prays against the one who wronged him, asking that he be afflicted with something equivalent to the wrong that he did or less than that. But if the supplication oversteps the mark, then it is a transgression, and it will not be answered."(Sharh Riyadh as-Salihin  4/615-616).      
Hence you should not pray against them asking that Allah afflict them with a calamity. Rather what is prescribed in your case is to pray that Allah will suffice you against their evil and their annoyance, or you could ask Allah to cause the equipment with which they are disturbing you to malfunction, and the like.
However, if you pray that they be guided, that will be better and preferable, for if Allah, may He be exalted, answers your prayer, you will get what you want of a cessation of their annoyance, in addition to the reward that you will attain for having been the cause of their guidance. Moreover, if you pray for your neighbour to be guided, the angels will also offer supplication for you.
It was narrated that Abu’d-Darda’ said: The Messenger of Allah (blessings and peace of Allah be upon him) said: “There is no Muslim who prays for his brother in his absence, but the angel says: May you have something similar.” Narrated by Muslim (2732).
Al-Qadi ‘Iyad (may Allah have mercy on him) said:
He will have a reward like that for which he prayed, because even though he offered supplication for someone else, he did two righteous deeds. Firstly, he remembered Allah, may He be exalted, with sincerity, and he turned to Him in his words and in his heart. Secondly, he expressed love of good for his Muslim brother and offered supplication for him, so he did a favour for a fellow Muslim for which he will be rewarded. And it is stated that his supplication will be answered, as is mentioned in the hadith. End quote from Ikmal al-Mu‘allim (8/228).
And Allah knows best.