The lanterns start out as a celebration for the baby princess Rapunzel. The King and Queen launched one into the sky, and it rose up into the heavens. When Mother Gothel stole the baby to keep herself young and beautiful, the lantern launching tradition began. Ever since then, on the princess' birthday, they launch thousands of glowing lanterns into the sky in hope that she will be guided home by them. While growing up, Rapunzel was fascinated by them and wanted to see them in person. She does end up seeing them with Flynn Rider and is fascinated by them.
The lanterns play another role in the series. In "The Quest for Varian", a lantern attaching a letter appeared in Rapunzel's nightmare. Later, Rapunzel found the same lantern alongside her statue. The lantern left a message and a key from Varian to seek Rapunzel's help.
The lantern that King Frederic and Queen Arianna send into the sky has Corona's sun crest. They use that style of lantern to start the festival off, before the rest of the kingdom send up their own lanterns.
After receiving a lantern from Varian in "The Quest for Varian", Rapunzel referred to it as a kite.