Armature Bone Global Local coordinates python scripting
Snap active pose bone to 3D cursor.

Using methods outlined in this answer, with a slight change to keep the orientation (rotation) of bone, and set the location to the 3D cursor.  To test run in pose mode with an active pose bone, which is snapped to 3D cursor.

import bpy
from mathutils import Matrix

context = bpy.context
scene = context.scene
pb = context.active_pose_bone
arm = pb.id_data

locmat = Matrix.Translation(scene.cursor_location)
# create tramslation matrix in pose space
matrix = arm.matrix_world.inverted() * locmat
# set the new translation to bone.
pb.matrix.translation = matrix.translation