It's not like people would just let their enemies walk up to the wall to get an accurate measurement. Was there a lot of guessing and estimation? What would happen if they got to the wall and the tower was far too tall/short?
This is not meant to be answer, more of a follow-up question: I would think that you would just build the tower until you could see over the wall. From a distance, off course. Once you could see over, your tower should be high enough.
Question is, is it really that simple, or were there other considerations? Would it be something that ancient or medieval soldiers could triangulate from a distance?
There are simple ways to calculate height pretty accurately using geometry. Any military engineer capable of building a siege tower would have known these methods as a matter of course.
See this page with several alternative methods of calculating the height of a tree. The same methods can be applied to any tall object.
http://lifehacker.com/5875184/is-there-an-easy-way-to-measure-the-height-of-a-tree