Mass
The basic SI unit of mass is the kilogram (kg). In physics, mass is not the same as weight, even though mass is often determined by measuring the object's weight using a spring scale, rather than balance scale comparing it directly with known masses. An object on the Moon would weigh less than it does on Earth because of the lower gravity, but it would still have the same mass. This is because weight is a force, while mass is the property that (along with gravity) determines the strength of this force.
Planetary mass
The difference comes from the way in which planetary masses are calculated. It is impossible to "weigh" a planet, and much less the Sun, against the sort of mass standards which are used in the laboratory. On the other hand, the orbits of the planets give a great range of observational data as to the relative positions of each body, and these positions can be compared to their relative masses using Newton's law of universal gravitation (with small corrections for General Relativity where necessary). To convert these relative masses to Earth-based units such as the kilogram, it is necessary to know the value of the Newtonian gravitational constant, "G". This constant is remarkably difficult to measure in practice, and its value is only known to a precision of one part in ten-thousand.