In times past, if a crewman on lookout duty was to shout "whale on the left side" or "shoals on the right" he'd be lashed to within an inch of his life, since "left" and "right" depend on which way he's facing. But "port" and "starboard" are unambiguous.
When facing the vessel's bow, "port" is left, "starboard" is right. The term "starboard" comes from the Old English "steorbord", the side on which the ship is steered.
Ships originally had a steering oar, a large, flat-bladed paddle that controlled the vessel's heading, the direction of travel. Since a vessel needed clearance for its steering oar it would tie up to a quay on the opposite side from its steering oar, and so this naturally became the port side.
Many gentlemen's clubs have enshrined this nautical tradition in the expression "pass port to the left" when the port bottle is handed around the table.
"Port" and "starboard" also give us the acronym "posh" – port out, starboard home – the preferred cabin sides for colonials travelling between England and India.