Greetings of the day!
In answer to the query you posted:
If a person, who is in possession of an animal, fails to take due care of keeping such animal from endangering human life or from causing grievous hurt to others, then he can be sued under Section 289 of the Indian Penal Code, 45 of 1860. The section prescribes punishment of imprisonment upto six months/fine upto Rs. 1000, or both.
It is irrelevant whether the animal is wild or domestic in nature. Even a single bite is sufficient to make the owner liable under this section.
However, there are certain things that you need to prove to go ahead with the suit:
1) That the neighbour is the actual owner of the Dog at the time of the incident,
2) That he had omitted his duty of taking due care,
3) That the dog had actually bitten or injured the 4-year old boy.
If you want compensation instead of punishment to the neighbour, then too, you can enter into a deed with him/her. With that, you could cancel the case and replace it with some compensation.
However, it is advised to first file a complaint. The suit is triable in any Magistrate Court. Try to collect good evidences and witnesses relevant to your case.
Hope this helps!