It's all in the balance. Personally, I have a trouble keeping my puns moderate. So, I turned to my pun expert, Mandy Lieng.
"Just don't try too hard like Thomas," she writes, "you just have to wait for the right moment."
I believe its all about context. A pun without context is like me (Evelyn); not useful. If a pun is well placed in a conversation, it will have a much greater effect than one that isn't. A good way to do this is basing your puns off of part of what someone else says. For example:
"Yeah (my crush) was trying to get into my locker," one person says.
"Maybe he was trying to steal something," another says.
".... steal your heart." Mandy says.
Also, don't force it. Constant, low quality, and quick puns are much worse than one good, comical, and well-placed pun. Think sniper rifle, not machine gun. Mandy is generally a quiet person, so her puns are that much more explosive. When in doubt, C4.
Another factor is timing. If you don't have just the right timing, nobody will get your pun. Too soon, and it takes too much thinking. Too long, and the topic has already changed. It's like dropping a bomb. If you drop it too soon, you will kill your own men, too late, and the target will already know of the attack.