UPDATE 2008-12-06: After Dominick Baier's comment (thanks!), I have now updated the code to be more effecient.
Since .NET 2.0 it has been possible to get the groups that a user belongs to, by accessing the Groups property of the WindowsIdentity class. What you get when from the property is an IdentityReference, which in turn has a Value property. You thought that the Value would contain the name of the group/role? No, it has the SID as the value, but this can be translated to the name, by using the Translate method. The translation can also be made for all the groups once by calling Translate on the IdentityReferenceCollection instead. This, of course, is much more effecient as Dominick comment on the original post.
WindowsIdentity identity = WindowsIdentity.GetCurrent();
IdentityReferenceCollection groups = identity.Groups.Translate(typeof(NTAccount));
foreach (IdentityReference group in groups)
{
Debug.WriteLine(group.Value);
}