I show my cards when I can craft a situation where it will help me in the long run. As much as I hate giving away information, I like giving away bad information. So if I make a sick call with an unimproved low pair based on a sick read and when I call my opponent mucks, I'll show.
And then the table is going to know I can catch a bluff from time to time.
When I run a solid bluff, I'll show, particularly if I don't plan on bluffing again in the near future, but want people to look me up when I'm strong and they are weak.
If you don't think you can craft an edge from it, don't try it. It's certainly a risk, and I would never show at a table with world-class players, or an online table where everybody is taking notes (presumably) and running their HUDs and tracking software (and maybe downloading my hand history to see just how terrible I am), in a live game against soft opponents I'll consider it.