He used the phases of Venus to find the angles in a Venus-Earth-Sun triangle. For example, when Venus appears half illuminated by the sun, the three bodies form a right triangle from Earth's perspective. Guessing (correctly, by chance) the size of Venus, Huygens was able to determine the distance from Venus to Earth, and knowing that distance, plus the angles made by the triangle, he was able to measure the distance to the sun. However, because Huygens' method was partly guesswork and not completely scientifically grounded, he usually doesn't get the credit.