Various interpretation of the moral of "Rapunzel" concern the inevitability of the life cycle and procreation. Other interpretations of the story focus on the struggle of the young against the old, according to SurLaLune Fairy Tales.
At one point in the story, the old witch locks Rapunzel in a tower in the middle of the forest. One interpretation of this is that the old witch is trying to postpone the inevitable life cycle that leads to adulthood, and in turn, she is also blocking the separation between a parent and child. Another example of this moral is when the blinded prince finds Rapunzel, even though she has been hidden deep in the woods by the old witch. This again represents the inevitability of the life cycle and procreation. The struggle between the young and the old is shown throughout the story, most noticeably in the fight between the prince and old witch.
Ultimately, "Rapunzel" is a tale of caution for parents. The story shows that children grow up and escape one regardless of their parents' efforts to keep them locked up and hidden from the world. The Brothers Grimm version of "Rapunzel" is believed to be based off of an earlier Italian short story called "Petrosinella." However, "Petrosinella" differs in that the main character develops her own plan to escape the tower with her prince and is not caught by the old witch.