Well, because you didn't state what you wanted to calculate the distance to, I'm going to assume it is the center goal.
If you are using a camera, track the light and use the camera's tilt angle (and a bit of trig) to determine the distance.
i believe the formula was
Code:
distanceToTarget = heightOfLight*tan(camTilt);