Keyframe the ocean modifier time property
Use keyframe_insert

Two things here, 


Add modifiers with Object.modifiers.new(...) returns a reference to
the modifier
Add keyframes with keyframe_insert(datapath) method.  Set the value, insert the keyframe.


Test script

import bpy
context = bpy.context
bpy.ops.mesh.primitive_plane_add(size=2, location=(0, 0, 0))
ob = context.object
om = ob.modifiers.new(name="Ocean", type='OCEAN')
# (frame, time) pairs
data = ((1, 1.0),
        (10, 3.0),
        (100, 33.0),
        )
for f, t in data:
    om.time = t
    om.keyframe_insert("time", frame=f)