So they could drink! Yep. Probably originating in the north Atlantic in summer it was the time of day that the sun seems to have risen far enough into the sky to be above the topmost yardarm. Likely about 11 am. By rule and custom this was the time of day for the first rum issue to both officers and crew on board ship. And whether aboard a sailing ship or on shore, officers would wait till “the sun is over the yardarm” before taking their first drink of the day.
A ‘yard’ is a spar on a mast from which sails are set. Back in the day the spars were horizontal and used for square rigged sails. Later yards were used for deploying wireless radio aerials and signal flags.
In Rudyard Kipling’s “From Sea to Sea” written in 1899 is the first known mention of this phrase that was used as a metaphor referring to drinking habits. The phrase, though, was in use earlier in the May 31, 1883 issue of the first volume of “Life.”
Ship’s officers took their rum ‘neat’ but the crew’s were diluted.
This phrase was also Pirate talk for “it’s time to drink!”