The energy of the ocean’s tides come from the gravitational pull of the moon and the sun upon the Earth. In fact, ocean energy comes from a number of sources. In addition to tidal energy, there’s the energy of the ocean’s waves, which are driven by both the tides and the winds. The sun also warms the surface of the ocean more than the ocean depths, creating a temperature difference that can be used as an energy source. All these forms of ocean energy can be used to produce electricity.