This toggle locates at View menu on both Dopesheet and Graph Editor. There is few information about it, and I can hardly understand the tooltip. I wonder what the "Show Group Colors" toggle does, or how it affects.
It displays the bone names background on the left in the Color Set select in the Bone Groups settings.
Yes, currently it is (afaics) only used for bone groups.
But this feature may evolve in future, those colors are actually those of the action groups (i.e. a set of actions). It just happens that currently, they are only set when matching a bone group…