How are the Bones assigned to the Vertex_Groups in the API?
Bones are matched to vertex groups based on names, that is the connection, they are not linked in another way.

for modifier in object.modifiers:
    if modifier.type == 'ARMATURE' and modifier.object:
        armature = modifier.object.data

        for bone in armature.bones:
            if bone.use_deform and bone.name in object.vertex_groups:
                print("'%s' used for armature deformation" % bone.name)