Robert Louis Stevenson's family background exposed him to both scientific and religious influences. Darwin's Theory of Evolution and the case of Deacon Brodie were social influences on the novel..
In 1859, when Stevenson was nine years old, Charles Darwin published The Origin of Species. This book became famous for introducing the Theory of Evolution to the public.
Many people saw it as an attack on religion, because the book made it impossible to believe that God created the world in seven days.
Darwin put forward the theory that all life, including humans, has evolved from more primitive forms. The transformation of Jekyll to the ape-like
Hyde links to this idea of a primitive nature inside us.
The book's release came at a time when many people saw science and a belief in religion and the supernatural as being at odds with each another. Many felt they had to choose between the two. And many believed that science had become dangerous and was meddling in matters which only God had control over. This is what Jekyll does in the novel.
The idea of a scientist playing God and suffering the consequences suggest influence from Mary Shelley's Frankenstein