Hello and welcome to Just Answer. My name is XXXXX XXXXX I'm happy to help with your question today.
It is not illegal as such to use barbed wire but the famer has a duty to ensure that the barb wire does not cause injury to other persons. If it does the injured party could apply for compensation. However, removing the barbed wire without the farmers permission could amount to criminal damage.