History is important in both Animal Farm and To Kill a Mockingbird, but it is used in markedly different ways.To Kill a Mockingbird teaches us a moral about a time period by being set in that time period, and Animal Farm does the same by being an allegory of a time period.
To Kill a Mockingbird describes a small town in Alabama dealing with racial prejudice during the tough times of the Great Depression. Every page is seeping with history.
Atticus said professional people were poor because the farmers were poor. As Maycomb County was farm country, nickels and dimes were hard to come by for doctors and dentists and lawyers. (ch 2)
This book describes a real historical time period, and then populates it with imaginary characters. The book was historical fiction when it was written in 1960 at the height of the Civil Rights Movement. It takes advantage of a period almost 30 years prior to make a point to people that racism is still a problem.
Animal Farm is a parable or allegory of the Russian Revolution. It is actually set in a somewhat imaginary world and time, and all of the characters and events are parallel. While each event in the book is based on a real historical event, the book does not take place in Russia during the time of the revolution. However, some of the dates are similar.
It was decided to set the gun up at the foot of the Flagstaff, like a piece of artillery, and to fire it twice a year: once on October the twelfth, the anniversary of the Battle of the Cowshed, and once on Midsummer Day, the anniversary of the Rebellion. (ch 4)
This is similar to the real October Revolution in the Russian Revolution.
In each case, history is used to prove a point. Yet, these two books are interesting examples of contrasting ways to do this.