Wikipedia offers a definition that's useful and concise as far as it goes:
Virtue signaling: the conspicuous expression of moral values done primarily with the intent of enhancing standing within a social group.
But as the term's gotten more popular, usage has gotten looser, and over-diagnosis has proliferated. Or at least, certain behaviors that look like mere virtue signaling may be something better, or worse.
For example, I know somebody who continually posts vulgar, extremist, designed-to-shock memes on Facebook. I was told she was mostly virtue signaling--not to worry about it, because she doesn't really live that way. That's just the image she cultivates on social media. In this case, her virtue-signaling was a lesser evil than her integrity would have been.
So maybe the key is whether you just say something or also live according to it. Is virtue-signaling just garden-variety hypocrisy?
If it is, that brings up the problem of the over-diagnosis of hypocrisy itself, which I've written about here.
Here's a good description of hypocrisy that I heard once on the final day of a retreat. The rubber was about to meet the road: time to translate all those pious thoughts and noble resolutions that come so easy when you’re whisked away from moldering laundry and leaky syrup bottles to the company of pleasant grownups on their best behavior. Time to grit your teeth and face that most daunting hurdle of all: Being Nice to the People You Live With.
The speaker told us, Look: if you proclaim that from now on you’re not going to holler at your kids, but you’re secretly planning to do it the minute you get home—that’s hypocrisy.
But if you resolve that you’re not going to holler at your kids, and the minute you get home, you find the fruit flies have commandeered the kitchen, and you holler—that’s not hypocrisy. (It’s weakness—it’s not recommended—but it’s not hypocrisy.)
I guess the problem really lies, at it so often does, with our love of prying into other people's tangles of motivations. Or, worse, not even prying--just assuming we know everything there is to know about them. Any discrepancy between professed principles and real-life actions is labeled "virtue signaling," and all the weak people who are trying but failing to be virtuous, as well as all the subtly virtuous people who are better than their professed principles, get tarred with the same brush.