An accurate clock is essential for the navigation.
For every 15 degree that one travels eastward, the local time moves
one hour ahead. Similarly, traveling West, the local time moves
back one hour for every 15 degree of longitude. Therefore, if we
know the local times at two points on Earth, we can use the difference
between them to calculate how far apart those places are in longitude,
east or west.
In the 17th century, sailors and navigators can find out the local
time by observing the Sun, but finding out the longitude require
the time of a reference point, e.g. Greenwich.
Although accurate pendulum clocks existed in that time, these clocks
could not keep accurate time at sea because of the motions of a
ship and changes in humidity and temperature.