According to the Newton's law of universal gravitation, two bodies will attract each other by a force which is directly proportional to the product of their mass and is inversely proportional to the square of distance between them. When we think of attraction between a body and a celestial body, we refer to the force of attraction as the gravity.

Given the same object (same mass) and at the same distance from each of the celestial bodies in question (Sun, Earth and Moon), the body will experience gravity which will be directly proportional to the mass of these bodies. The sun being much heavier than Earth and Moon will exert much more gravity than the other two bodies. Earth being heavier than Moon will exert more gravity than the moon. In fact, Earth has 6 times as much gravity as the Moon, while the Sun has 28 times the gravity of Earth.

Thus, the celestial bodies can be arranged in term of increasing gravity as:

Moon < Earth < Sun.

Hope this helps.