How to add an object to an existing group from Python?
It is actually pretty simple:

import bpy

grp = bpy.data.groups.get('bacon')

obj = bpy.data.objects['Cube']
grp.objects.link(obj)


This avoid the hassle of setting up the context for bpy.ops operators.