How to add keyframe for data value with script?
Completed script:

import bpy

curr = bpy.context.scene.frame_current;

for ob in bpy.data.objects:
if "_hitbox" in ob.name:
    ob.follow_bone = False
    ob.keyframe_insert("follow_bone",frame=curr)
if ob.pose is not None:
    if ob.pose.bones is not None:
        for bone in ob.pose.bones:
            if ".IKC" in bone.name:
                bone.constraints["IK"].influence = 0
                bone.constraints["IK"].keyframe_insert("influence",frame=curr)


To add a keyframe, simply set the value like usual - for example,

bone.constraints["IK"].influence = 0


And then add a keyframe for that value on the current frame (see top of full script for "curr" variable).

bone.constraints["IK"].keyframe_insert("influence",frame=curr)


It is possible to set a keyframe on any frame. For example, if I wanted a keyframe at frame 27:

bone.constraints["IK"].keyframe_insert("influence",frame=27)