At first glance, there are few similarities between these works. One is a novel, written by a British author, while the other is a poem, written by an African American author. The styles used by the two authors are quite different.
However, on the thematic level, there are similarities. The biggest of these is the idea of a mask, with the related theme of changing identities. In Golding’s novel, civilization is a mask that is easily torn off when the boys are stranded on an island. When the boys go hunting in Chapter 4 of Lord of the Flies, they paint their faces, putting on a new mask to show their new identities.
Just as no parent would see the savage inner being of their beloved boy in Lord of the Flies, so no one sees the pain of the suffering “we” in “We Wear the Mask.” While that “we” is first African Americans, smiling in response to social mistreatment, Dunbar never specifies, and so it can be universal. We all wear a mask in Dunbar’s poem and Golding’s novel.