"a Conceit arising from the use of two Words that agree in the Sound, but differ in the Sense" [Addison]; "An expression in which the use of a word in two different applications, or the use of two different words pronounced alike or nearly alike, presents an odd or ludicrous idea" [Century Dictionary]; 1660s (first attested in Dryden), a word of uncertain origin.
Perhaps from pundigron, meaning the same thing (though attested first a few years later), itself a word of uncertain etymology, perhaps a humorous alteration of Italian puntiglio "equivocation, trivial objection," diminutive of Latin punctum "point." This is pure speculation. Punnet was another early form.
Pun was prob. one of the clipped words, such as cit, mob, nob, snob, which came into fashionable slang at or after the Restoration. [OED]
The verb, "to make puns," also is attested from 1660s, first in Dryden. Related: Punned; punning.
At the revival of learning, and the spread of what we may term the refinement of society, punning was one of the few accomplishments at which the fine ladies and gentlemen aimed. From the twelfth to the sixteenth century, it was at its greatest height. The conversation of the witty gallants, and ladies, and even of the clowns and other inferior characters, in the comedies of Shakespeare and his contemporaries, which we may be sure was painted from the life, is full of puns and plays upon words. The unavoidable result of such an excess was a surfeit, and the consequent dégout, which lasted for more than a century. Like other diseases, it broke out again subsequently with redoubled virulence, and made great havoc in the reign of Queen Anne. [Larwood & Hotten, "The History of Signboards from the Earliest Times to the Present Day," London, 1867]
1570s, via Portuguese Japao, Dutch Japan, acquired in Malacca from Malay (Austronesian) Japang, from Chinese jih pun, literally "sunrise" (equivalent of Japanese Nippon), from jih "sun" + pun "origin." Japan lies to the east of China. Earliest form in Europe was Marco Polo's Chipangu.
"lavatory," 1940, but perhaps 1922 (based on a pun of Joyce's); perhaps [Dictionary of American Slang] from French lieux d'aisances "lavatory," literally "place of ease," picked up by British servicemen in France during World War I. Or possibly a pun on Waterloo, based on water closet.
"equivocate, evade the point, trifle in an argument or discourse, turn from the point in question or the plain truth," 1650s, from quibble (n.). Earlier "to pun" (1620s). Related: Quibbled; quibbler; quibbling.
1590s, an abusive term for a person, perhaps meaning "a pedant;" c. 1600, "a whim;" 1640s, "pun or word-play," a word of unknown origin, said in 17c. to be Oxford University slang. Perhaps the sort of ponderous mock-Latin word that was once the height of humor in learned circles; Skeat suggests Latin conandrum "a thing to be attempted" as the source. Also spelled quonundrum.
From 1745 as "a riddle in which some odd resemblance is proposed between things quite unlike, the answer often involving a pun." (An example from 1745: "Why is a Sash-Window like a Woman in Labour? because 'tis full of Panes").
seminal rock and pop group formed in Liverpool, England; named as such 1960 (after a succession of other names), supposedly by then-bassist Stuart Sutcliffe, from beetles (on model of Buddy Holly's band The Crickets) with a pun on the musical sense of beat. Their global popularity dates to 1963.
"errand-runner," 1956, American English coinage from verbal phrase go for (coffee, spare parts, etc.), with a pun on gopher. Gopher also was late 19c. slang for a young thief, especially one who breaks in through small openings.