Ants are pests. There is no disputing that. Few people would say they could be beneficial. People with worm farms may not go that far, but they can be somewhat helpful by transporting minerals. No matter how helpful they may be, most of them want the ants gone.
They can be an indicator that the bedding for your farm is too dry. If you dampen the bedding, the ants will more than likely leave. It is also suggested by many to place the legs of the worm farm, if it has them, in containers of water. Also suggested is to add a drop or so of dish soap to the containers and/or add Vaseline to the legs of the worm farm.
If you keep your bedding moist, it will help to deter ants from making their home with your worms.