What object's gravitational pull interferes with tidal energy?

Sun

Earth

Moon

Moon