1660s (first attested in Dryden), of uncertain origin, perhaps from pundigron, which is perhaps a humorous alteration of Italian puntiglio "equivocation, trivial objection," diminutive of Latin punctum "point." This is pure speculation. The verb also is attested from 1660s. Related: Punned; punning.
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]