You can't get something from nothing. Data's cells must recharge using a variety of mechanisms. Wireless power, as others suggested, is likely a mandatory thing when Data is around powered sources. But he has also existed for long periods away from power grids, so his battery cells must recharge via other means. I suspect his skin has some kind of solar recharging properties to it. Maybe when he's out in the wilderness, he goes naked or periodically sun bathes.