Before understanding tidal force we should be clear in our mind about gravitational force. The gravitational force between two bodies is proportional to their masses and inversely to the square of the distance between them. In Earth-Moon system or Sun-Earth system this is responsible for keeping these bodies tied up to each other while remaining in their orbits. These forces are computed between the centre of these heavenly bodies and act in that direction only.
Now let us consider the gravitational force exerted by moon at different points on earth and acceleration created therein. Because of difference in distances to different parts a differential force is created which is termed as tidal force and is the reason for tides on Earth due to Moon.
In a similar way Sun also creates tides on Earth. Using the general equation F=ma where F is the force and m is the mass and a is the acceleration generated by F, we get a first-degree approximation for tidal force acceleration value = 2GmR/D3
where G is the universal gravitational constant, m is the mass of the heavenly body creating tides on Earth, R is radius of the earth, D is the distance between that body and earth. Please note that D is raised to power 3. The derivation of this equation requires expansion of differential acceleration polynomial in a series and neglecting the higher power terms.
The tidal force by Earth itself on a body placed on its surface is very small as differential acceleration is very very minuscule and is negligible.
Using the approximate formula as above for tidal force of Sun and Moon on Earth respectively we will find that the tidal force of Sun on Earth is quite less (almost half) then that of Moon exerted on Earth.
So the sequence is Moon, Sun and Earth.
Knowledge is power.