The phial contains the Light of Eärendil—the captured radiance of the Star of Eärendil (the Silmaril borne by Eärendil the Mariner, set in the heavens as the Morning/Evening Star).
Galadriel presents it in Lothlórien: "May it be a light to you in dark places, when all other lights go out." It shelters Frodo and Sam in Shelob's Lair and the Tower of Cirith Ungol.