You can only cover up inner savagery so long before it breaks out, given the right situation. It's better to examine the consequences of a decision before you make it than to discover them afterward. The fear of the unknown can be a powerful force, which can turn you to either insight or hysteria.
Frankenstein, like Lord of the flies, was set at huge times of change in history, at the turn of the century (1800's) respectively. These changes though were more towards industrial revolutions and major advances in science. People of this time feared that knowledge possessed by a person could be misused to the extent of "disaster" to some people. The fear was for the future. And that when people advance on an idea they will not know when to stop, creating a fear for daily life, not knowing what to expect. At the time religion played a very important part in people's lives and the advances in science and man's newfound desire to create may create a widespread loss of faith. Shown when Dr. Frankenstein creates a "monster" so to speak. .
After saying this, it is also clear that there are many differences in the structures of the two stories. .
In Lord of the Flies, the book is in "order", while in Frankenstein we start by looking at the conclusion of the tale, then looking at how it came to all this. In Lord of the Flies, though, there is a 3rd person narrative, where as the reader is drawn in being an "onlooker" rather than just a reader. .
The settings of the two titles are also different to one another. Lord of the Flies is set in an island in the middle of nowhere, removed from any civilization. Maybe removing it from any reality. The events in the story may also back this claim up. The way the island starts off as a paradise resembling Eden and contrasting with the environment and the boy's behavior turning hostile works well. The weather also shows effect, when events are going well, like when they first meet and are happy, it is bright and sunny.