Which type of wave is most affected by gravity from the Sun and the moon?

Tides. Tides are caused by the gravitational pull of the Sun and the Moon on the Earth's oceans.