The sun has less of an influence on tides than the moon,however the sun does affect the intensity of the tides, depending on where the sun is in relation to the moon.
Tides are caused by the common attraction of the Moon and the Sun. They defeat, in a some degree, permanent attraction the Earth is exerting on water which is causing the flow, drawing oceans and seas waters .
If only Moon would act on Earth, tides will have always the same intensity. It is known however that the tides intensity increases overnight and then decreases. This attraction is due to the intervention of the Sun, which increases or decreases the Moon attractiveness in relation to the position of Moon and Sun have toward the Earth.
Sun, though bigger, exercises less attraction power than the Moon . When Sun and Moon are found on the same line with the Earth, at new moon and full moon, the flow is most powerful as to the force of attraction of the Moon is added the one of the Sun.
The tides are caused primarily by the gravitational pull of the moon on earth. In addition the gravitation pull of the sun also impacts the tides to some extent.
Moon's gravitational force pulls the water in oceans nearest to the moon towards itself and away from the land mass on opposite side of the earth. This causes high tide in the part of the earth toward the moon and low tide ion the other side.
Sun also exerts similar pull on the water on in the Oceans. However, the magnitudes of Sun's gravitational force on the earth is much less than that of the moon. With the result that the effect of moon dominates over that of the sun. Only impact of sun is to increase or decrease the magnitudes of the tidal variations marginally.