The theme is the main topic, idea, or message in a piece of writing.
The theme of Black Beauty is most definitely that horses (as well as all animals and also people) ought to be treated kindly, ethically and humanely.
The book is about the life story and experiences of a horse called Black Beauty who is treated well by his owner in the beginning of his life but is later mistreated by other owners. The story describes how horses were often treated badly in Victorian England and how the animals suffered injury and sometimes even death due to the mistreatment.
The book also underlines issues of social class, inequality and wide differences between the poor and rich in England at that time. The book was so influential after it was published in 1877 that it even contributed to the eradication of the bearing rein. This was a rein used to pull horses' heads back, causing them pain.