I have also used lyr.longName, as this has a slash between the group name and the layer name. While this isn't a safe character for output, it is a handy way to separate the names sometimes.
for example, I have a script which creates layer files from an mxd, and to identify if a layer is in a group (rather than being a group layer) I use the following and change the output name accordingly (as I am outputting all layers - stand alone, group layers and sub layers and there is a high likelihood of duplicate names):
if lyr.longName.find("\\") > -1:
# change the name
out_lyr = lyr.longName.replace("\\","_")
# or, functionally the same
out_lyr = arcpy.validateTablename(lyr.longName)
GroupLayer\Layer becomes GroupLayer_Layer.
For generating unique output names I do an Exists() check, and increment a counter at the end of the name as necessary.