Almost everyone who thinks the term "virtue signaling" designates a useful concept seems to believe it describes a bad thing, while others - no doubt in response to the way that the concept is employed in practice - deny that it usefully describes anything. Against either of these positions I think simple reflection on the concept - that is, the signaling of virtue -shows that it describes things that are both real and mostly good.
What is signaling?
Signaling occurs when an agent (or "agent"-like construct, like "selfish" genes) wishes to indicate that it has some quality, but directly displaying that quality is expensive or otherwise difficult, and so displays a proxy quality - something that is less expensive or otherwise easier to display if it in fact has the qualities it would want to display anyway. The key to this is that an agent without the underlying quality can display the proxy quality - it just has to jump through more hoops to do so.
A classic example of this from biology is aposematism, where bright colors warn away predators. Why would it do so? Because it is less expensive for poisonous (or otherwise harmful to attack, like stinging, etc) prey to abandon camouflage than for non-poisonous (&c.) animals to do so. The only benefits less dangerous animal can get from this are strictly derivative of those acquired by the more dangerous ones doing so:
|be colorful||be dull|
|poisonous||colorful skin will ward away predators||enjoy camouflage from predators, but do not ward them away with colorful skin|
|harmless||ward away predators as long as they can't distinguish you from an actually poisonous species; stand out and get eaten otherwise||enjoy camouflage from predators|
As a result, we can see that the pattern in nature beautifully matches what the theory would predict: conspicuous coloring is adopted by poisonous or stinging animals and by the creatures that can best pass for them, while everyone else attempts to mimic the environment instead. Although top predators can be dangerous, they do not adopt such markings, because they also want to remain hidden from prey - alerting the world to their dangerousness, aside from the special case of intraspecific competition, is very much not the point!
It is worth noting that both the genuinely poisonous creatures and their more snackable epigones are engaged in "poison signaling." Just because truth in advertising is not guaranteed does not mean no advertising is truth - just because yellowjacket coats signal that they can sting the shit out of you does not remove the fact that they indeed can - and in fact the signaling would not work without the genuine connection.
Actual agents engage in signaling as well. For instance, it would be both onerous and weird to indicate that you have money by showing people your credit card statement. But you can don expensive clothing. The poor can save up and splurge on expensive clothing as well, but the rich can do so without the onerous "save up and splurge" part, so it remains an effective, if imperfect, signal.
What is virtue?
While there is a reasonably technically precise definition of "signaling," there is not so much a technically precise definition of virtue. Moreover, I'm not a philosopher and, quite frankly, just don't understand the claims of virtue theorists. I think everything coherent is a more or less straightforward version of consequentialism and what follows is going to reflect that.
But one perfectly reasonable definition, it seems to me, is that virtue is any quality that gives you intrinsic motivation to do the right thing for its own sake, where the "right thing" is the outcome we'd all prefer on reflection and behind the veil of ignorance, or whatever. For instance, compassion is a virtue, because a compassionate person gets fuzzy feelings from knowing suffering has been relieved and gets bad woozy feelings from knowing suffering is going on. An honest person likes telling the truth and dislikes lying. And so on.
Since we are interested in virtue signaling as a sociological phenomenon and would like to be able to define it in naturalistic terms, we can also consider a "virtue" to be any underlying character trait that people admire. There are plenty of situations in which this distinction will be relevant - for instance, when someone is adhering to a cultural norm, or whatever, that you don't think should actually be admired on reflection - but in general, when we are explicitly focusing on this, the specifically signaling-related aspect of it is typically, and rightly, set aside for "object-level" considerations - we focus not just on the fact that they are trying to conform to a norm but whether that norm is good in the first place. (Suppose you are a Stirnerite or Objectivist or some other kind of tryhard toughness-signaler and you think compassion is actually bad, or whatever.)
What is virtue signaling?
Virtue signaling, then, is any behavior that is easier to engage in if you have traits that encourage you to engage in good behavior, and thus undertaken for that purpose. The first clause, concerning the actual set of behaviors that virtue signaling will consist in (rather than the second, concerning motivation,) is not tautologically equivalent to "good behavior" - but the relationship is pretty damn obvious.
When you give a dollar to a beggar because you don't want her to look into your eyes with a "what a douchebag" stare, that's virtue signaling. When you avoid telling lies because you know eventually they're going to be found out and the people around you would then trust you less, that's virtue signaling. When you refrain from throwing out a racial slur at someone in an a heated argument, even though it would make them feel awful and thus give you at least for a brief moment the beautiful visceral sense of winning, because you don't want to be humiliated as a racist, that's virtue signaling. When you avoid getting in a fight in the first place because you don't want them whispering about what a drama bomb you are, that's virtue signaling. When the moon's in the sky like a big pizza pie because some guy said "hi five!" to moons looking like pies, that's a-virtue signaling.
Virtue signaling is just people responding to the incentives created by our social practices of moral praise and blame, which is the whole point of having them in the first place. If I as an anti-capitalist were to say that companies producing products that consumers enjoy doesn't really count as good because after all the company is just doing it for money, a proponent of capitalism would laugh her ass off at me - and with good reason. There are specific critiques of any given incentive system - of an economic system as in that case, or of an informal set of social values, as discussed above - but those are logically distinct from the question of the motives of the participants.
Taking for granted the worthiness of the actual values we're socially rewarding, are there cases where people act worse than they otherwise would in their attempt to seem as if they actually are virtuous? Yes, and these are worthy of discussion - but they should be understood as the exceptional, rather than default, case of virtue signaling.
Since we are discussing hidden motives, &c., I should perhaps mention that I have a bit of a selfish stake in this question myself. I am just reflective enough to know that I deeply dislike personal reflection. My actions are apparent to me, their consequences can be externally investigated, but my motives for any given action are often opaque. I do know that I care about how people view me. Might it be virtue signaling all the way down? There are a priori reasons to suspect not - the underlying trait has to exist for behaviors to signal it - but perhaps in my individual case it is the case. I have no idea how ordinary this phenomenology is, but when I do real good, I want it to still "count" in some way (even if this desire is itself derivative of my concern for my reputation, whether "in the eyes of God" or more concrete persons.)
One way in which virtue signaling can be bad, and two ways in which its derogatory connotations can be appropriate
Virtue signaling is actually doing something bad not when it is merely worse than what an actually virtuous person would do - obviously if we could directly install actual virtue that would be superior, and then we could dispense with external reward systems entirely - but when it's worse than what a non-incentivized person would do. This is the case when the values themselves are bad, but leaving those aside, it is the case where people engage in expensive practices to keep up appearances that outweigh the actual good done in the course of it. It probably is fair to say that. e.g., many online witch hunts are cases of virtue signaling gone bad. But our ordinary language of dishonesty, hypocrisy, proportionality, and so on are sufficient here. When someone engages in externally proportionate, compassionate, &c. calling-out of racist language, &c., then it doesn't matter if they are doing so only with regards for their reputation - they system works! Likewise someone who gets some poor schmuck fired from Target out of entirely genuine antiracist zeal can be correctly criticized for not taking other things into consideration. Someone whose genuine antiracist zeal was "interfered with" by a selfish desire not to appear disproportionate in front of his Twitter followers would be acting better. The actions are the ultimate desiderata - ultimately not just the incentives introduced by social approval but the virtuous character traits themselves derive their value from that - and thus, in almost all cases, the proper targets of critique.
I thus suspect one reason, ironically, why "virtue signaling" has become a term of abuse is that any instance where we can conclusively identify it is one where it isn't working. Someone who lies about donating to charity is observably signaling while someone who just gives to charity could actually be generous (which is exactly what makes their signaling effective.) We don't, after all, just want to make "virtue signaling" term of abuse for anyone who does something good - even though that seems to be roughly how the 4chan crowd uses it. Something we should appreciate is that 4chan is to a great extent correct that, even if they've evolved their own unique norms, socialization, and forms of social pressure, they really are a space where the "hypocritical mask"of ordinary social approval and disapproval has been torn off - and an object lesson of why such things serve a valuable function.
Finally, identifying virtue signaling as such is relevant when the dispositions of particular people are relevant. If Alice is going on a date with Bob, and would like to go back to his place but for the concern that he might not respect her boundaries, and would otherwise be reassured regarding this by feminist statements he has made, then the possibility that he is merely virtue-signalling feminism is relevant to her considerations about his real character - even if they are not relevant to the truth-value of those statements.
Thus, I think there are situations in which virtue signaling is produces genuine bads, and I also think virtue signaling is a genuine sociological phenomenon that is worth focusing on. However, we fail to notice the vast unseen good it does, and where it does bad, this is due to additional elements that we should lay our corrective stress on instead.