Midsummer or Jani in Latvian, Jaanipaev in Estonian and Jonines in Lithuanian is a traditionally pagan festivity marking the summer solstice on the shortest night of the year on June 23 - 24. John or Janis, Jaan or Jon is a deity of fertility. His day is celebrated as an end of the spring sowing season and beginning of the summer harvest.
Estonia
St. John’s Eve (Jaaniohtu, also Jaanilaupaev) and St. John’s Day (Jaanipaev) are the most important days in the Estonian calendar, apart from Christmas. On Jaaniõhtu, Estonians all around the country will gather with their families, or at larger events to celebrate this important day with singing and dancing, as Estonians have done for centuries.
Understandably, some of the rituals of Jaanipaev have very strong folkloric roots. The best-known Jaanik, or midsummer, ritual is the lighting of the bonfire and the jumping over it. This is seen as a way of guaranteeing prosperity and avoiding bad luck. Likewise, to not light the fire is to invite the destruction of your house by fire. The fire also frightened away mischievous spirits who avoided it at all costs, thus ensuring a good harvest. So, the bigger the fire, the further the mischievous spirits stayed away.
http://www.baltictimes.com/news/articles/26464/