What is the purpose of Dill in the story
In Harper Lee's To Kill a Mockingbird, Dill serves as the close friend and part-time neighbor of the protagonist, Scout Finch, and her brother, Jem. Dill offers much needed outside perspective on the town of Maycomb since he spends only summers there. His innocence brings to light the town's racism and the flawed nature of the judicial system (particularly in the actions and words of the prosecutor) during the trial of Tom Robinson. Dill is also a potential romantic interest, albeit a naive one, for Scout, with whom he discusses having a future with and even proposes to.
Additionally, Dill gets both Jem and Scout interested in the mysterious Boo Radley, who they wish to see emerge from his house and shed his reclusive nature. It is Dill who first gives the children the idea of making Boo "come out."