According to Greek mythology, Demeter is the goddess of agriculture. Her daughter, Persephone, is beautiful, of course, and this attracts the attention of Persephone's uncle Hades, god of the underworld. He decides to marry Persephone (in some versions, he just kidnaps her) and drag her down there, much to her mother's chagrin.
To show her displeasure, Demeter causes worldwide famine. She stays pretty mad even after an agreement is reached that allows Persephone to remain above earth for part of the year; Demeter vows that nothing will grow. Thus, the seasons are born.
In the poem, Demeter prays to Hades, who is, after all, a god. Perhaps this is the only way she can contact him. It's no traditional prayer, though; in fact, it's more of a threat. And there's a kernel of truth in that threat (we should all come to know how we negatively affect others around us) that we should all pay attention to, not just a god.