How to move selected object to the curser location using a python command?
Cursor location is global

The location of the cursor can be considered as "global coordinates".  The cursor has no parent. When the cursor location is set to zero, it sits at the scene origin. 

An object's location is relative to its parent.  Its "global" or "world" transforms can be gleaned from obj.matrix_world.

To get an object in the scene by name

name = "Foo"
scene = context.scene
obj = scene.objects.get(name)


If there is no object named "Foo" obj is None 

To move the object to the cursor location.

obj.matrix_world.translation = scene.cursor.location


To align both location and rotation to the cursor (Note assumes obj has unit scale)

obj.matrix_world = scene.cursor.matrix