Data apparently gets his energy from the environment somehow, as Odo does. Also, TOS' Nomad claimed to possess 'perpetual energy,' or words to that effect. Which means that Nomad was able to draw more than enough energy from his environment for his day-to-day activities. That, or Nomad had in store an infinite amount of energy, which doesn't seem plausible at all.
There are plenty of energy beings, for example, which inhabit deep space. Such as the Calamarain. How do they take in energy? It seems as though they take it in from their surroundings.