August Strindberg specifically set his play Miss Julie to take place on Midsummer Eve, in the kitchen of a Count's country house. That's not a holiday we celebrate much in the 21st-century U.S. What was the significance of it?
Well, the opening stage directions of the play specify, "The stove is decorated with bunches of birch leaves; the floor is strewn with juniper." Such decorations would have been typical in 19th-century Scandinavia on the night before the summer solstice, which is what Midsummer Eve marks.
Another tradition was the cooking of trollsoppe, or troll soup. This is the "magic potion" Jean alludes to when he sees Julie is up to something with the cook. He hints they are preparing a traditional dish that will allow them to dream about the future that night. Young women in northern Europe would typically prepare a special soup so they could dream about their future husbands on Midsummer Eve.
Of course, that's not what's being prepared at all. As the cook has already made clear, she's been working on an abortifacient for Miss Julie's dog Diana, who has been impregnated by a dog owned by the gatekeeper. In this play, the romance of Midsummer Eve always masks something far more sinister. In a sense, the holiday is like the "Turkish pavilion" Jean remembers sneaking into as a boy. He recalls he "had no idea what it was for." In fact, it was only a fancy outhouse.
The holiday of Midsummer Eve is perhaps best exemplified in the play by the song the peasants sing, which sounds festive, but upon closer examination, is actually a little dirty. "The bridal wreath I'll give to you," they all sing, "But to another I'll be true." Jean calls the song obscene, and tells Miss Julie that they are singing about the two of them. He offers to help her run away... to his bedroom. We can guess what happens there. The peasants sing and dance on stage, while offstage there is a different sort of dance between Jean and Julie.
Midsummer Eve, and the celebration of the summer solstice generally, goes back to pagan times, though the Christian church appropriated it, making the solstice also the Feast of Saint John the Baptist. This shows up in Miss Julie when Jean is preparing to go to church with the cook as he promised. When he asks what the lesson of the service will be, she responds, "The beheading of John the Baptist, I suppose." That story, filled with sexual longing, sin, and death, has multiple resonances with the play.
As Midsummer Eve gives way to the actual midsummer solstice--the Feast of John the Baptist and the longest day of the year--the light of morning seems to break the spell of Jean and Julie's infatuation. Scandinavian folk belief held that sunlight "breaks the troll's spell" as Jean says. Trolls that were caught out in the sunlight would allegedly turn to stone and shatter at dawn, as happens to Julie's dreams.