Absolutely.
Get a product called "Google Apps Manager" by Ditto! :-).
Seriously, that's one of the tasks that GAM shines at.
In version 2.99(1) -- the beta for 3.0 -- it's even easier.
Create a text file with the full username of the users you want in each group, one per line. Name it something like 'members.txt'.
gam update group groupname add member file members.txt
Or, if you want to make sure the group only has those members, use the command:
gam update group group sync member file members.txt
The second command removes anyone -- including owners and managers -- from the list who isn't in the file.
I generate the files I use from a SQL server table that's populated, in part, from our Employee Information System.
Essentially, I start by creating the group in case it doesn't already exist. I update the key settings I want to control. Then I generate a text file of all of the members. I synchronize that with the group. I generate a file of managers, and use the gam update group update manager command to set people to that role as appropriate. Once a week, I update the status of everyone who should only be a "member" back to member in case they've been changed by a group owner or manager.
I do this with several thousand groups -- I create groups for the teachers and classes in a 20,000 student school district.
Hopefully, you already figured out how to do this!
Thanks,
Albert