Dr. Rappacini is not unlike Hawthorne's character of Roger Chillingworth of The Scarlet Letter, also sickly and sallow looking, and a man who seeks to possess the soul of another: "He will be mine," he tells Hester Prynne when he first comes to see her in prison. Like Claude Frollo of Victor Hugo's Notre Dame de Paris (Americans call it The Hunchback of Notre Dame)--another work from the Romantic Period--who is likened to the fly caught in a web as he delves deeper and deeper into alchemy, both Rappaccini and Chillingworth cross through into a world that diminshes their humanity as they become obsessed with their science and are caught in its web.
As an allegory, "Rapaccini's Daughter" has characters who act as symbols of a type of people, with events that are extended metaphors for abstract ideas. Thus, as an allegory, Hawthorne's story definitely has a moral tone, much like other narratives of Nathaniel Hawthorne. Throughout this story, for instance, the allusion to the Garden of Eden is made. That Beatrice is alluring sexually and represents for Giovanni an Eve as a temptress is apparent; however, she is not evil. Rather, she is a victim of her father's immoral experiment, just as Giovanni falls victim, as well. The dark, sickly Dr. Rappicini acts counter to humanity in his scientific altering of his daughter, which has taken from her certain human qualities. Not unlike Victor Frankenstein, Rappicini overreaches his bounds in his experiments in science. There is something unnatural is what he has done, just as it is wrong for Frankenstein to have created his creature.
Much concerned with the moral aspect of things, Hawthorne, as a Romantic writer and the descendent of Puritans, includes much that is moral in his works. In "Rapaccini's Daughter," Dr. Rappaccini represents the evil experimenter absorbed in his science to the detriment of his family. He furthers the theme of Science vs. Nature, a issue of paramount importance in the discourse of nineteenth-century Romanticism that questioned the problems arising from technology. It is, then, not presumptuous for people to view this story as one that carries a moral.
Since Hawthorne is a writer from the Romantic Period any discussion of his allegory must include the morality of Dr. Rappaccini's experimental treatment of his own daughter,stepping out of the bounds of what is man's realm. That Rappacini loses her because of his rival, Dr. Baglioni, is clearly an indictment against science and those who would assume roles that are best left to the Creator.
I couldn't presume to tell you what a story someone else wrote says with absolute certainty. It does, however, seem as if Hawthorne may be suggesting a few things about science and ethics and consequences.
First, anyone who practices medicine and/or does research has an obligation to maintain the ethical standard of honesty. Rappaccini conducts his experiment on his daughter and a perfect stranger, Giovanni. Similar behavior toward some of Rappaccini's other patients (guinea pigs?) is hinted at by rival doctor Senor Baglioni, as well. None of them realize they're being used in this kind of cosmic experiment--and they should.
Next, a medical practitioner must treat hs patients as people, not as expendible objects of research. Baglioni tells Giovanni what is said about the reclusive doctor/scientist:
"But as for Rappaccini, it is said of him--and I, who know the man well, can answer for its truth--that he cares infinitely more for science than for mankind. His patients are interesting to him only as subjects for some new experiment. He would sacrifice human life, his own among the rest, or whatever else was dearest to him, for the sake of adding so much as a grain of mustard-seed to the great heap of his accumulated knowledge."
He has apparently allowed his insatiable hunger for more knowledge to blind him to the human-ness of his pateints. This is clearly morally and ethically wrong.
Finally, a doctor who treats or reasearches should never do his patients harm; his oath is clear on that point. Instead, Rappaccini has created a poisonous garden, a poisonous daughter, and a poisonous beau for Beatrice. Despite his incredulity that his daughter is appalled at what he has done, he knew what he was doing by cultivating Beatrice as he would a plant (the purple "sister" plant). The young couple is poisonous to all but one another, and Rappaccini is actually proud of his accomplishment. Ironically, after all his efforts to create the perfect human being (in his view, anyway), he loses his daughter to a curative, a concoction designed to heal.
Clearly this is at least a partial commentary on the ethics of medicine and research. When a man who has promised to heal decides to ignore his oath and disregard his patients, everyone loses.