What unit of measurement is used when calculating the distance between earth and the sun?
You can use many different units but I think you are asking about an Astronomical Unit.
The Astronomical Unit is the distance from the Earth to the Sun. Initially it varied dependent upon where the Earth was (perehelion etc.) but now they just use the average distance between the Earth and Sun. It is 93 million miles or about 150 million km.
The only other unit I have heard used somewhat consistently is the light minute, or the distance light travels in a minute (usually seconds are also included). The Earth is a little more than 8 light minutes from the Sun.
Astronomical Unit or AU
One Astronomical Unit is defined as the distance between the earth and the sun. Mars is about 1.52 AU from the sun. Pluto is about 40 AU from the sun.
This unit is used because many distance calculations rely on parallax measurements. The distances to stars which are relatively close to our solar system can be measured by observing changes in position in the sky. Two observations made at different times of the year can show that these nearby stars move a little relative to the background stars. The distance to the stars is calculated using the position of the earth at different times of the year using simple geometry where the position of the earth forms the base of the triangle and the observations tell you the angles of the two sides. The dimensions are relatively simple to work out in AU.