Deforming a mesh in realtime (Game Engine)
Firstly you'll need to use the bge module, bpy data access wont work since the game engine stores its own data.

For this you will need to use KX_MeshProxy, In the link there is an example for changing a meshes vertex color, but from the API docs you can see how you could change location.

eg:
    from bge import logic

cont = logic.getCurrentController()
object = cont.owner

for mesh in object.meshes:
   for m_index in range(len(mesh.materials)):
      for v_index in range(mesh.getVertexArrayLength(m_index)):
         vertex = mesh.getVertex(m_index, v_index)
         vertex.XYZ = 1, 2, 3 * v_index


Note


that this isnt really optimal from Python, for a high poly mesh the Python script may slow down execution a lot, if the motion isnt so fast you could move N verts per script execution, so at least you dont get jerky playback which would happen if you simply execute the script less often.
You may want to look into GLSL vertex shaders, this is quite invovled but has the advantage that moving vertices about is offloaded onto the graphics card.