I ran across this today and thought I would take a minute to blog about it because I didn't find exactly what I wanted by Googling. I have a SharePoint Group that I have created and I need to set that in a list so I can use it later on. I found a lot of articles on how to set a People or Group field by using the SPFieldUserValue but I didn't know how to get from a SPGroup to that object. Then it dawned on me to use the ID and Name properties of the group. Bam works like a charm. Here is the code:
SPGroup group = rootWeb.SiteGroups[groupName];
SPFieldUserValue value = new
SPFieldUserValue(rootWeb,group.ID, group.Name);
item["Committee Group"] = value;