You may groan when someone makes a pun, but it's unlikely that that will stop the perpetrator from punning in the future. Punning has a long history, and is a technique that has been used by the most illustrious of historical figures. The ancient Roman orators Cicero and Quintilian believed that the use of puns indicated an intellectually supple mind, and was a sign of rhetorical skill. Shakespeare frequently uses puns, too, for instance in Hamlet, in the scene between the grave-digger and Hamlet, where the grave-digger makes puns on the different meaning of the word 'lie', and in As You Like It, where Shakespeare plays on the words hour and whore, which were pronounced identically at the time (see this old post). Jesus Christ used puns in his native Aramaic, for example in his statement 'upon this rock I will build my church', a pun on the name Peter and the ancient Greek word for 'rock', petra.
Most of the above comes from an interesting piece on the BBC website this week about the history of paronomasia, or wordplay based on punning. Commentators have always argued about the hidden meaning and purpose of puns, and have disagreed as to whether they are good things or not. Freud felt they were a sign of weakness, used instead of uttering unpleasant truths.
One clever pun I came across recently - while touring Sanssouci Palace in Potsdam - was this one, sent by Frederick the Great of Prussia, to Voltaire:
à sous p à cent sous si (sous means 'under', and cent is 100)
which is a pun on à souper à Sanssouci (to supper in Sanssouci).
Voltaire's response, Ja! is not the German word for 'yes' but is another pun:
J grand, a petit (large J, small a), pronounced in French j'ai grand appetit (I've got a large appetite).
Here's the BBC article.