The Sun most certainly does have an effect on the tides on earth.
The “tidal” effect that one body has upon another manifests itself by stretching the effected body, elongating it in the direction of the influencing body. This is easily seen on the earth as it is covered in water. This effect varies directly with the mass of the object (the greater the mass the greater the effect) and varies inversely with the cube of the distance (the greater the distance the lesser the effect).
The Sun has a mass about 27million times that of the moon but is 400 times as distant from the earth. So the tidal effect that the moon has upon the earth is about 2.4 times that of the Sun. (Four hundred cubed divided by 27 million).