Attempts to measure the distance from the Earth to the Sun were made in Ancient Greece (Aristarchus of Samos), but to call them accurate was difficult. In the XVII century this distance was measured using the method of parallax (difference of position of an object relative to a subject based on the position of the observer). Was determined as the horizontal parallax of the Sun is the angle with the Sunlocated on the horizon, is visible perpendicular to the line of sight radius of the Earth. Further research was based on the length of the radius of the Earth.
In 1672, it was determined the distance from earth to Mars, who at that time was located in the diametrically opposite point of the Sun. The trigonometric laws that allow to calculate the relative distances of the planets, expressed in fractions of the distance Earth-Sun, was known, and with their help, it was computed the actual distance from the Sun to the Earth. At that time it was the most accurate value of 138.5 million kilometers.
Subsequently, the astronomical unit was trying to determine many times, taking as a basis of computing the distance from Earth to Venus, but because observers were quite a lot, and the dimensions were of high complexity, the inconsistency in the obtained values was very large. In the late nineteenth century by measuring displacement of the apparent positions of the stars was computed a more accurate value 149, 5 million kilometers.
The second half of the XX century brought the scientific and technical revolution, and with it the development of radio. That is the radar method (in which in the direction of a celestial body send short impulse, take the reflected signal and based on the speed of propagation and the transit time of the signal in both directions to determine the distance to this body) allowed to calculate the distance from Earth to the Sun as accurately as possible at different times of the year and take an average value equal to 149 597 870 km.