Boo Radley has many purposes. From a plot standpoint, he helped show the innocence of Jem, Scout, and Dill, while ensuring that Jem and Scout survive their run-in with Bob Ewell.
Boo Radley is also a foil to the townspeople. At the beginning of the novel he is portrayed as a monster. The idea that he killed someone, had lived inside for so long, that he was an enigma all helped create this monster image. The townspeople on the other hand were viewed as good. As the novel progresses the bad or evil part of human nature becomes more obvious in the townspeople. At the same time Boo Radley is slowly losing his monster status in the eyes of the children. They know it is him leaving the gifts, although they do not understand why. They also do not understand why his brother fills the hole in the tree. So in addition to acting as a character foil, he is also representative of all the children do not know or understand. By the end of the novel, Boo has saved the lives of Scout and Jem, while the townspeople have convicted the innocent Tom Robinson. He is essential to the idea that people are not always what they appear to be. This idea is built up also through the characters Tom Robinson and Bob Ewell.
Boo Radley is also representative of the outsider. He is a monster because he is unknown. Stories abound about him because he is seen as strange. At the end of the novel, even though Boo Radley saves the Finch children, he does not reenter the community. He is still an outsider. Scout recognizes his need at the end when she takes him by the hand. She also notes that Boo was nice, not the monster they had made him out to be. It is through Boo Radley and Tom Robinson that one of the major themes of the book comes through -- we can often look at people but not recognize them as human. Scout learned to see the individual, the rest of the community however did not.
Some students focus on the racism in Maycomb Alabama, especially since so much of the novel revolves around Tom Robinson. I believe that Boo Radley is added in to take away from an idea that racial differences are all that cause discrimination but that unless people really "see" each other (as noted at the end of the book) problems will still abound. Ultimately, people should not be easily judged.