Sometimes the historical setting is absolutely intrinsic to the plot and theme--even character--of a novel. For instance, Nathaniel Hawthorne's The Scarlet Letter has as the Puritan colony in which the narrative is set. Without the backdrop of Early America and the ideology of Puritanism, Hester could not be the character that she is, the theme of "secret sin" would not exist, and the sufferings of Reverend Dimmesdale as the minister of the Puritan community who has sinned against Puritan law would not be what they are. In addition, there are other aspects of the plot and Hawthorne's symbolism which are affected and developed by the historical setting of the novel. The forest, for example, is perceived by the Puritans as the Devil's place of hiding, yet for Hester and Dimmesdale it is a place where they are free to meet and talk outside the "prison" of the Puritanical society.
Indeed, historical setting often plays a major role in the narrative of many a novel. Charles Dickens's A Tale of Two Cities, for example has its narratives and character development revolve closely around the historical setting of the French Revolution and the discontent and criminality in England as it was "the best of times,...the worst of times." The main character, Sydney Carton, could not have redeemed himself as he has if it were not for the setting of the French Revolution.
Setting is where and when a story takes place. Understanding the historical setting of the story often helps to understand the theme or main idea of the story, the author's purpose for writing. For example, if you know nothing about the Holocaust, the novel Night doesn't make a lot of sense. The more you know about World War II, Nazism, concentration camps, and Jewish culture, the more meaning you will be able to extract from the novel.
Many misunderstandings and misinterpretations about literature have occured because readers try to interpret the work through modern eyes or with their own personal biases rather than understanding the historical context of the author and the influence of the historical setting.
Historical setting refers to many things, but helps us to understand the context of a story or event. For example, it would include things like the time period of the event, the country or place or society in which it takes place, or the events that are happening at the time outside of the story, such as "in colonial times" or "during the American Civil War".
It helps us to understand the motivations and actions of some of the characters or historical figures. If we have a character who is very openly racist, it would make more sense if the story takes place during the mid 1800s as opposed to in the modern day. Without historical setting it is sometimes difficult to get the main ideas and points of a story.