How to Add Users to BuddyPress Groups in Bulk
First please use this code snippet
Select the users you want to add to a group and select Add to BP Group. A prompt appears asking for the Buddy Group ID you want to assign the users to.
To locate the Group ID, click on the Groups admin menu and click on the group’s name. The URL will look something like this admin.php?page=bp-groups&gid=357&action=edit and the ID is the number that appears after gid=. After entering the ID number, click the Ok button. All of the users you selected will be assigned to that group.
Thanks to Alexander on the WPMU DEV forums