First, author Harper Lee set the novel in a period in which she grew up and knew well herself: the Deep South of the Depression-era 1930s. Jim Crow laws were still in effect, and Negroes were treated as second-class citizens by most of white society. Change was slow to evolve in the South, but Lee and the family that she creates, the Finches, do their best to treat everyone fairly, and Atticus proves to be the quintessential liberal Southern gentleman, blind to skin color and gender. Life in the South was only beginning to change at the time TKAM was published in 1960, and the Civil Rights Movement was gaining momentum in Southern states like Alabama, where the story takes place. TKAM's timeliness served as a reminder to society that the old ways of the past were long past due for a change and that the centuries-old idea that "all men are created equal" was meant to include Negroes and women as well as the white man.
Two of the main characters in the novel, Tom Robinson and Boo Radley, are innocent men who are accused of crimes they did not commit. It is primarily through prejudice--both racial and social--that drastic changes are forced on their lives. Tom is falsely accused by the racist Ewells and later convicted by a prejudiced, all-white jury that Atticus understands "couldn't possibly be expected to take Tom Robinson's word against the Ewells' ". Boo, meanwhile, is subjected to cruel and unusual punishment by his own father and to social castigation by most of Maycomb's society. Since Tom and Boo are innocent of the crimes of which they are accused--the adult human mockingbirds of the story--they become tragic characters who elicit both sympathy and admiration from the reader. Lee also explores other forms of prejudice besides racial and societal: Women and children are targeted by Maycomb citizens as well; strangers and newcomers are considered outcasts; and those with supposed mental or physical deficiencies (Boo, Tom, Dolphus Raymond, Tutti & Frutti, Crazy Addie) are scorned in different ways.
The town the novel is set in is a southern town with southern beliefs. The town is very traditional is a sense that, even after the Civil War, they still do not have equality for Blacks and Whites. It is such an important theme because Atticus goes against the towns general prejudice to defend Tom Robbinson. Also the whole start of the law suit was because Tom was black. Through the trial, Jem and Scout see how messed up the world can be. They were raised by Atticus to accept everybody, regardless of their skin tone. Harper Lee discovered that exact thing herself when she was a child through a court case in her Alabama town.
Prejudice is the most important theme in To Kill A Mockingbird.