How do astronomers find out the correct weight of a planet tough there isn't any direct means to weigh them?What technique do they use?Just curious!
I don't know if this is what most astronomers use, but it is certainly a method that could be used. It also makes for some interesting photos.
Gravitational lensing was one of the great predictions of Einstein's theory of general relativity, and was actually one of the first pieces of evidence for it - see the solar eclipse of 1919. Gravitational lensing is the bending of light by a massive object. Because mass and energy warp space-time, we know that if you can calculate how much the light is bent, you can calculate the mass of the body bending it. Wikipedia gives the following formula:
where $M$ is mass, $r$ is the distance the object is from the light, and $G$ and $c$ are, of course, constants. So if you can measure how much light is bent by an object, you can calculate its mass. It's hard, and you would need good conditions for it to work, but it could work, nonetheless.
they use Newton's law of universal gravitation, example gravity interaction between moon and earth , jupiter Jupiter and its moons, or sun and planets, you can find here , play with m1 and m2, G and r , to calculate , the key is r and G , get m1 for earth and m2 for any body in free fall , after get distance between earth and sun, and get m for the sun , if they required most exact I guess that they use relativity and Lorenz transformations.