Q: When we use tidal forces to generate energy, that energy has to come from somewhere. Doing this, does it mean that the Earth slowly escapes the sun's attraction since we use the sun's gravity as an energy source? - Anonymous

That's an interesting question. The tides do have effects on orbits, but not quite what you'd guess. For starters, the tides on earth are mostly from the moon, not the sun. Your idea about tidal friction draining energy from other forms is completely correct, however.  
So let's start with the effects of the moon tides. The facts are that the moon is moving away from the earth at about 3.8 cm per year and that the earth's days are getting longer at about 2 milliseconds per century. The earth's orbit around the sun changes by only a negligible amount.

These lunar tides mainly can drain energy from two sources:
1. the rotational energies of the earth and (to a much smaller extent ) the moon
2. the orbital energy of the moon.

 
One effect is to slow the earth's rotation, gradually making days longer. That's what's happening, and that's where energy is actually being drained from.

The other effect is less obvious. Draining energy from the moon's orbit would actually cause the moon to speed up while pulling it in closer to the earth. The reason is that in a gravitational orbit like that, the change in potential energy is twice as big and opposite in sign to the change in kinetic energy. So speeding up and moving in closer is the way to losenet energy.

Adding energy to the moon's orbit actually slows its orbital speed a bit while increasing its distance to the earth and adding gravitational potential energy. Since the moon is actually moving farther away and slowing down, its gaining orbital energy. How can that be? Although the tides cause a net energy drain to heat, they're also transferring some of the energy drained from the earth's rotation to the moon's orbit. It turns out that this must happen in order for the angular momentum lost as the earth's spin slows to go somewhere. Angular momentum goes up as the distance grows.

These two effects will continue until the moon-tides stop, when the moon orbits the earth in one day.  The earth will have slowed its rotation down to the point where the same side always faces the moon.

You can see an example of something just like that. The moon rotates just fast enough to always show the same face to the earth. Tidal friction caused that.

The end result will be that both the earth's and moon's rotational speed (length of day) as well as the lunar month will be equal, about 47 of our current days.  This will happen far, far in the future, several billions of years from now.  

Sun tides would produce similar effects, but not as large. They also tend to make the days longer.

There are some nice  articles on this:

Google+ Followers