To measure the distance, place a capo on the nut and then use a ruler to measure the distance from the top of the capo to the bottom of the string. If the distance is too small, the strings will buzz against the fingerboard when played. If the distance is too large, the strings will be difficult to press down and the intonation will be off.
It's also important to make sure that the strings are parallel to the fingerboard. If the strings are not parallel, the intonation will be off and the violin will sound out of tune.
If you are unsure about how to adjust the string height, you can take your violin to a luthier for assistance.