how to move an object in a random position in y axis

Start with this. (Assuming you’re using UnityScript).

transform.position.y += Random.Range (-10.0, 10.0);