The poem doesn't explicitly answer the questions of when and why the mariner and his crew set sail in the first place. We can assume that the weather was fair when they set out, for "
'The ship was cheered, the harbour cleared,
Merrily did we drop
Below the kirk, below the hill,
Below the lighthouse top.
The sun comes up and down in its diurnal rhythms, and there's enough wind for the ship to make good time. Otherwise, we aren't told what time of year it is, what year, or where they were going.
Bill Whelen, author of Captain Cook's Navigator and Coleridge's Poem: William Wales, Samuel Taylor Coleridge and "The Rime of the Ancient Mariner," suggests that Coleridge based his poem on the adventures of Captain Cook, a British explorer, and cartographer who sailed and mapped the Atlantic and Pacific Oceans, going as far south as Antarctica. Coleridge took a class from Cook's retired navigator and had access to his journals, and Whelan speculates that Coleridge wrote his famous poem based on them. This would suggest that the goal of the mariner's fictional journey was exploration.