Twain often likens man to insect as a way of implying that both species are equally insignificant. In the "showing off" scene at the Sunday school during Judge Thatcher's visit, "The librarian 'showed off' - running hither and thither with his arms full of books and making a deal of the splutter and fuss that insect authority delights in." The image deflates the man's unwarranted self-importance.
A similar metaphorical use of the insect occurs when Tom's conscience is tortured by his knowledge that Muff Potter may be hanged because of his silence over the murder. There is a violent thunderstorm, which Tom interprets as God's wrath against him: "It might have seemed to him [God] a waste of pomp and ammunition to kill a bug with a battery of artillery, but there seemed nothing incongruous about the getting up such an expensive thunderstorm as this to knock the turf from under an insect like himself." On one hand, Tom considers himself as insignificant as an insect; on the other, because he specializes in casting himself as a hero at the center of things, he is convinced that he is important enough in God's eyes to merit a "battery of artillery."
Literal insects are used in church and school scenes to comment satirically on the events. While Tom is supposed to be listening to a prayer in church, he finds himself more fascinated by a housefly cleaning itself. His detailed observation of the fly comments indirectly on the tediousness, emptiness and insignificance of the prayer from Tom's point of view. A subsequent scene, in which the entire congregation's attention is stolen away from the sermon to to antics of a bug and a poodle, carries the same satirical flavor: when it comes to a contest between a bug and religion, the bug is the winner.
When Tom finds himself bored by his school lesson, he directs the movements of a tick on his slate, using a pin. The tick becomes a symbol of how the school tries to control Tom. It also reveals his selfish character: Tom is impatient when the tick is on his friend Joe's side of the slate, and changes the rules he himself drew up, in order to recover control over the tick.
The town of St Petersburg
Many critics view St Petersburg as a microcosm of America. It contains in microcosm all the great institutions: public morality, the law, education, religion, medicine, and economics, enabling Twain to satirize them all. In this context, Tom, Huck and Joe Harper's escape to Jackson's island symbolizes their withdrawal from mainstream society as part of a rite of passage; they will re-enter society as more mature people.
In traditional stories of heroes and in more modern adventure stories, as a rite of passage marking the transition between boyhood and manhood, the hero often descends into a cave or labyrinth, where he undergoes ordeals. If he shows courage and passes the ordeals, he gains a treasure and returns with it to society, enriched and enriching others. Twain's novel follows this mythical tradition, which symbolizes the hero's withdrawal of his senses from the external world of illusion so that he can discover an eternal inner truth or self-knowledge (the treasure). Though Tom's irresponsibility leads to his getting himself and Becky lost in the cave, he acts with resourcefulness, courage and compassion and is able to get both of them out. Though he does not find the treasure on this occasion, he later realizes that this is where it is hidden, and returns with Huck to claim it.
Treasure, particularly gold, is an ancient symbol of self-knowledge or wisdom. This holds true in this novel, with Tom and Huck having to show courage, selflessness and resourcefulness in 'earning' the treasure. It has a second meaning, too, symbolizing the boys' leaving behind their childish trashy "treasures" and their entry into the adult monetary system. Both meanings carry the sense of a rite of passage from childhood to manhood.
The Adventures of Tom Sawyer: Metaphor Analysis