Where there is a right, there is a remedy.
This is a legal maxim, which means that where there is a right, there is a remedy. To get a legal remedy, a person should possess a legal right. Whenever the law gives a right to a person or prohibits an injury, then it also provides a remedy. So to sue in the court of law, one should establish his right and its violation.
B was a reputed officer in elections who wrongfully refused to take the vote of A. There was no loss suffered by A as the candidate whom he wanted to win won in spite of this. Since the right of A was violated, B was liable to pay damages.