Today, this can be done (in some cases, e. g. moon and venus ) by
means of laser or radar beams sent to the planet, and measuring the
time till they are reflected to earth.
Centuries ago, however, brilliant astronomers spent a lot of effort in
thinking and observation to solve this problems with geometrical
methods, starting with calculation of the distance moon-earth and
sun-earth in about the 2nd century b.c. So your question is not that
simple to answer, however, once you understand the principle of those
calculations, they indeed appear very elegant. Generally, they employ
the determination of the angles or parallaxis of sun, moon and/
planets (or moon) from different places on earth of known distance,
especially during transits or eclipses, when more accurate
measurements are possible. To get an idea, you can find explanations
and some drawings he
http://www.badastronomy.com/mad/1996/au.html
http://www.jca.umbc.edu/~george/html.../parallax.html
The attempts to determine the distance sun-earth during the venus
transit in 1761 and 1769 was, by the way, one of the first global
scientific cooperations, involving astronomic obeservations from
scandinavia to tahiti (by captain cook) . You can find some
information about this and other facts on former and next year's venus
transit he
http://www.transitofvenus.org/
"Earth Resident" schrieb im
Newsbeitrag ...
How did scientists calculate the distance between earth and moon,
earth and
sun etc.