AFAIK it was possible long before the first interplanetary probes.
Who did it?
The book The Transits of Venus, by Sheehan and Westfall, describes how Aristarchus used Hipparchus' calculation of the Earth-Moon distance, who in turn used Eratosthenes' calculation of the Earth's circumference, to calculate the Earth-Sun distance.
Aristarchus of Samos was the first to seriously calculate the distance to the Sun, using geometry. When the Moon is exactly half illuminated when seen from the Earth (first or last quarter phase), then there is a right triangle between the Earth, Moon, and Sun, with the Moon at the right angle. Then he could measure the angular distance in the sky between the Sun and the Moon, plus the Earth-Moon distance and geometry, to get the Earth-Sun distance.
The most famous ancient estimate of the earth's circumference as made by Eratosthenes of Cyrene (c. 276-196 BCE), the librarian at the great library at Alexandria. By using a simple gnomon, he found that at Syene, ... the sun at the summer solstice cast no shadow at all: it was exactly overhead. ... At the same moment, at Alexandria, the shadow cast by the sun shows that it stood 7.2 degrees from vertical. This difference is equal to 1/50 of a circle.
Using the distance between the cities, Earth's circumference could be calculated.
Once the earth's radius is known, the earth itself can be used as a baseline for determining still greater distances -- the distance to the moon.
[I]t becomes possible to work out the earth-moon distance indirectly from the geometry of [lunar] eclipses. Using this method, Hipparchus of Rhodes (fl. 140 BCE) worked out that the distance of the moon was 59 earth radii. It's a good approximation - with 1 1/2 or 2 earth radii of the modern value.
Using the Earth-Moon distance and the separation of the Moon from the Sun in the sky when the Moon was at exactly half-phase, Aristarchus calculated the Earth-Sun distance.
Aristarchus put forward a geometrical argument, based on determining the sun-earth-moon angle at the time the moon's phase is exactly half. For this angle, which is actually 89.86 degrees, Aristarchus used 87 degrees; the disagreement is more significant that it might appear because the critical quantity is the difference between the angle and 90 degrees.
Because of this Aristarchus only got a value of the equivalent of "5 million miles", much too small.
Phil Plait has, on his old Bad Astronomy site, an article answering a question about how astronomers originally calculated the distance from the Earth to the Sun (the AU, or astronomical unit).
Huygens was the first to calculate this distance with any kind of accuracy at all.
So how did Huygens do it? He knew that Venus showed phases when viewed through a telescope, just like our own Moon does. He also knew that the actual phase of Venus depended on the angle it made with the Sun as seen from the Earth. When Venus is between the Earth and Sun, the far side is lit, and so we see Venus as being dark. When Venus is on the far side of the Sun from the Earth, we can see the entire half facing us as lit, and Venus looks like a full Moon. When Venus, the Sun and Earth form a right angle, Venus looks half lit, like a half Moon.
Now, if you can measure any two internal angles in a triangle, and know the length of one of its sides, you can determine the length of another side. Since Huygens knew the Sun-Venus-Earth angle (from the phases), and he could directly measure the Sun-Earth-Venus angle (simply by measuring Venus' apparent distance from the Sun on the sky) all he needed was to know the distance from Earth to Venus. Then he could use some simple trigonometry to get the Earth-Sun distance.
This is where Huygens tripped up. He knew that if you measured the apparent size of an object, and knew its true size, you could find the distance to that object. Huygens thought he knew the actual size of Venus using such unscientific techniques as numerology and mysticism. Using these methods he thought that Venus was the same size as the Earth. As it turn out, that is correct! Venus is indeed very close to being the same size as the Earth, but in this case he got it right by pure chance. But since he had the right number, he wound up getting the about the correct number for the AU.
Basically, Huygens used good methods, except for using "numerology and mysticism" to determine the size of Venus. He was lucky that Venus was almost the size of Earth; that made his estimate for the AU pretty close.
Not long after, Cassini used the parallax of Mars to determine the AU. (Same article as linked above.)
In 1672, Cassini used a method involving parallax on Mars to get the AU, and his method was correct.
Parallax is the apparent difference in angle observed due to the differing observing positions. The smaller the parallax, the larger the distance.
However, the precision of the resultant calculation depends on the precision of the observations, and measurements of the parallax aren't that precise.
In 1716, Edmond Halley published a way to use a transit of Venus to accurately measure the solar parallax, i.e. the difference in the Sun's position in the sky due to observers at different latitudes.
Because of the latitude difference of the observers, Venus would appear to move along chords of different length over the disk of the sun. The motion of Venus being nearly uniform, the length of each chord would be proportional with the duration of the transit. Thus, observers would not actually have to measure anything; they would only have to time the transit. Fortunately, existing pendulum clocks were more than sufficiently accurate for this purpose.
They could time the transit, which would last hours, with great precision. But they had to wait until the next transit of Venus in 1761. Then, observers observed the black drop effect, which made it very hard to time the event from start to finish precisely.
The black drop effect cannot be eliminated altogether, but it is much more ever in observations made with telescopes of imperfect optical quality (as many of those used at the 1761 transit were) and in boiling or unsteady air. Confusion about the times of the internal contacts ... yielded contact times that differed among observers, because of the black drop, by as much as 52 seconds.
In the end, there as a wide range of published values, from 8.28 arc-seconds to 10.60 arc-seconds.
But then there was the transit of 1769. Observations in Norway and in the Hudson Bay were made for the northern observations, and Captain James Cook was sent to what is now Tahiti to make a southerly observation. Jérôme Lalande compiled the figures and calculated a solar parallax of 8.6 arc-seconds, close to the modern figure of about 8.794 arc-seconds. That calculation yielded the first fairly accurate calculation of the Earth-Sun distance, of 24,000 Earth radii, which given the Earth's radius of 6,371 km, about 153,000,000 km, the accepted value being about 149,600,000 km.
Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?