Boredom or dietary deficiency.
It is normal for horses to eat grass, but boredom, a bad habit, or a salt/mineral deficiency could cause the tree bark nibbling. This is a sign that there is something not quite right going on and shouldn’t be ignored.
Be sure that your horse has a fortified salt and mineral block in the pasture, and that it has good quality hay and grain (if necessary) to eat.
Also make sure your horse isn’t chewing on other items like the leather from your tack.
Be sure that your horse has been properly dewormed and is in good health.
A veterinarian could evaluate the horse to be sure that it is healthy, and if not, what treatment is needed.
A veterinarian can also check the horse’s teeth to ensure that they are wearing properly and to determine if they require floating.