The townspeople of Hamelin -- and particularly the children -- were probably stricken by a horrible event in the 13th century. One of the most common theories about what happened was that the town's youth suffered from some epidemic. Historians suggest that if a widespread epidemic did occur, the townspeople would have buried the children in a large common grave, which the story depicts as the site of their disappearance [source: Dirckx].
The nature of this disease is disputed. Because rats are featured in the story, scholars think it might have been a disease that spread from rodents, like the bubonic plague. Some even suggest an early version of the Black Death infected them. The piper's pied clothing might have evolved from the idea that the visitor had splotchy skin lesions brought on by the disease. Another theory states that the dancing children in the story may have been exhibiting symptoms similar to those of Huntington's disease.
But if the young people were all infected, one can reasonably question why no adults were. One theory states that the children weren't afflicted with disease but rather struck out on an ill-fated children's crusade. If this is true, it probably happened a few decades earlier when groups of young people around Europe were known to participate in the Crusades. They would leave to follow one child who claimed to have a vision from God that ordered them to march to the Holy Land and win it back for Christendom.
And some people interpret the Grimm story quite differently. They claim that the children lived and came out the other end of the cave in Transylvania. This points to the idea that the children went east to form their own colony. Fairy tale scholar Jack David Zipes substantiates this notion with documents that show evidence that someone came to Hamelin around that time looking for recruits to colonize areas of eastern Europe [source: Zipes].
Whatever happened to the children, it seems to have been traumatizing enough for the people of Hamelin to produce this tale. Even if scholars never uncover the truth, perhaps we'd do well to simply heed the lessons in this cautionary tale.