I'm playing X-COM: Terror From The Deep and my aquanauts sometimes run out of energy while moving. What determines the rate at which they use and regain energy?
Your aquanauts expend energy for moving (i.e. expending time units). The amount of energy lost is half of what it costs your unit to move in terms of TU. Your aquanaut also regains energy at the rate of (initial TU)/3 per turn. Initial TU means the raw TU units of your aquanaut at recruit.
The reason why they are running out of energy is most likely due to the fact that you are traversing a long distance over multiple turns, this is equivalent of becoming gassed and out of breath. If you want to avoid this, you will have to carefully manage their movement and try to minimize those long sprints.
yx gave you why energy is depleted, let me give you a bit more.
Typically, the best thing that I've done to not have this problem is to make sure that I am saving turns for a snap shot if possible. Not only will this let me kill an alien if I find one, it will also let me not use all of my energy.
Secondly, avoid going through rough terrain as much as possible. It's not always possible, but if you try, it will help with both turns and energy.