Deform a mesh object in a random manner in Blender using Python
Using bmesh on an edit mesh (run in edit mode)

import bpy
import bmesh
from mathutils import Vector
from random import uniform
context = bpy.context
obj = context.edit_object
mesh = obj.data
delta = 0.2
# get a bmesh
bm = bmesh.from_edit_mesh(mesh)
for v in bm.verts:
    if not v.select:
        continue
    v.co.xy += Vector([uniform(-delta, delta) for axis in "xy"])
#update.
bmesh.update_edit_mesh(mesh)


bpy.ops.transform.translate will translate all selected vertices.  Using it in the loop as you had it, if all verts are selected would move all verts a random amount for each vert. (or nowhere for any vert with a 0 coordinate) You would need to copy the selection, deselect all, select them individually transform the single vert, deselect etc.  Also remember scalar vector multiplication needs to be scalar * vector.