Huh, that's really weird. There's actions to add and remove units from control groups, but I don't see any way of finding out if a unit is in a control group, or a function to reference that control group as a whole. Pretty odd.
The only way to really do it is to add units to a unit group variable when you add them to control groups. The problem with this would be that units added manually by the player (via Cntrl+#) would not be added to the unit group. Depending on what you're trying to do, this might not be a big deal since you can periodically clear the unit group, enumerate units which meet certain conditions, then add them to the control group and unit group variable.