What precisely are you trying to do? Style a comment if a user is in a particular group? (is that a BuddyPress Group?)
If so, it’d be best to save that in the ‘commentmeta’ when the comment is saved to the database (saves a query per comment, which could get bad quickly). Let us know and we can help.