It is not simply your right, it is a matter of your safety, too. If you are the exclusive owner of a property, you have the right against someone attempting to tresspass i.e. trying to interfere with your peaceful enjoyment of the land by making unlawful entry. You should confront your neighbor, what legal reason could he possibly provide you with for building an entrance to your private property?
If you do not want to proceed with a civil suit, (in a criminal suit, he'd be liable u/s 441, 442 of IPC if he commits any one of the ingridients of criminal tresspass, but I'm sure you do not want to wait till he actually does that,) at least know that building a lock to avoid property tresspass is a matter of your right.