Even though the Sun is much farther away from the Earth than the Moon, it exerts a stronger gravitational pull because it is so huge. However, the sun exerts a smaller tidal influence on Earth than the moon.
The reason for this is that there is very little difference in the sun's gravitational pull on the surface of the Earth compared to the center of the Earth. This is because the Earth's diameter is such a tiny fraction of the distance between the Sun and the Earth.
Earth is much closer to the Moon, and there is a significant difference in the Moon's gravitational pull on different parts of the Earth.
This is what leads to tides. The Moon pulls the water (which is on the near-side surface) more than it pulls the Earth itself, which leads to a high tide. On the far-side surface the Moon's pull is less than at the center, so the Moon basically pulls the Earth away from the water forming another high tide.
it is because there is a constant balance, though the moon is small and the sun is big, the moon is very much closer to earth as compared to Earth. So, by calculating it I found that moon has a greater tidal force than sun because sun is 150 million Km far away.
The tidal force is based on the difference in the moons gravititional effect between the near and far sides of the earth . This difference decreases rapidly with increasing distance. Despite the sun's great gravititional effect , its greater distance means that it pulls the near and far sides of the earth more evenly then the moon does, resulting in a smaller tider effect.
First of all, the Sun is further away from the Earth, than the Moon, so Moon's influence is strongest than the Sun's. To be more accurate in explaining, let's say that tidal influence of the Moon is much more stronger that the Sun's, because of the fractional difference of The Moon's force across the Earth is stronger. There are two high tides/day on the Earth. Moon's gravitational field is acting in one way at the Earth's surface and in the other way in the center of the Earth.
So, there is a high tide on the side nearest the Moon because the Moon pulls the water away from the Earth, and a high tide on the opposite side because the Moon pulls the Earth away from the water on the far side.