This title has been applied to Mary for centuries. One explanation is that when St. Jerome translated the Hebrew word mar, he used the Latin word stilla. Yam is the Hebrew word for "sea." Thus, maryam (Mary's name) would mean "drop of the sea." Later, the Latin stilla (drop) was read as stella (star). "Drop of the sea" became "star of the sea."
Ave Maris Stella is a ninth-century Latin hymn honoring Mary. Considering the dangers of sea travel in ancient times, it is easy to imagine that sailors and passengers gladly prayed to Mary for safe passage.