What is the correct context area for bpy.ops.uv.snap_selected?
Turns out you have to modify not only the area type but also the ui_type for this to work. For the specific case of bpy.ops.uv.snap_selected operator, the area_type is IMAGE_EDITOR and the ui_type is UV. This piece of code works:
bpy.context.area.type = 'IMAGE_EDITOR'
bpy.context.area.ui_type = 'UV'
bpy.ops.uv.snap_selected(target='PIXELS')