This is a great question, but let's start with the natural limitation
In keeping with the laws of thermodynamics, the human body cannot generate more energy (for any purpose, including cooling or heat) than it can take in. In fact, since some of the energy it takes in must be used to keep the body alive, there's a substantial limitation to what the body can do. In the short term, it could generate life-saving cooling or heating. An example would be to connect an exercise bike up to an alternator that, in turn, drove a heater or cooler. But every coulomb of energy the body produces comes at the expense of consuming energy that could be used to pump the heart and work the muscles.
In other words, you'll generate all the HVAC (heating, ventilation, and air conditioning) you need until you drop over dead, which will happen at a much earlier age than you would have lived had you been able to use that energy for other purposes.
What does this mean? It means that body movement alone is a poor way to generate energy for any purpose. Not that this matters, because...
Let's talk about literary license
Dune's stillsuits were fascinating when Herbert first released the story. They were an inventive solution to an obvious problem: how do you have a bunch of Bedouin survive a planetary desert? Not a well or an oasis to be found. Herbert's capture of body water is "simple" and realistic: the water from sweat, urine, feces and breath is captured through several layers of undefined [this is important!] cloth such that it is perfectly stored in catch pockets (no or virtually no loss). Here's the kicker, though... pumps were part of the heel of the boot to provide the pumping action needed to move the water around. That's undefined, too! Finally, Herbert never explained how the solids were removed. And I'm not just talking about what's left over in feces once the water is drawn away. I'm talking about the salts from sweat, the nitrates from urine, etc. That's never defined.
And this is an incredibly important lesson for a new author. You don't need to explain every little detail. In fact, you don't want to explain every little detail. Remember those laws of thermodynamics I mentioned? If you applied them to "the pumping action" of Herbert's stillsuits, what you'd have is an impractical to use (if not impossible to use) solution because the few centimeters of pumping due to the fall of a foot (children's and adult's, female and male, lots-o-variation there) aren't actually enough to do what Herbert envisioned. My point is, literary license doesn't require you to explain anything. And that's valuable, because sometimes what you want to do can't actually be explained.
Having said that...
How the body and/or the suit can pull energy from the environment
The suit can be made out of a solar-absorbing material. Remember that black is the absence of reflected light. If you had a 100% efficient solar material, it would be black. Would it be enough for your needs? Literary license — it does by definition.1
The suit is made up of miles upon miles of flexible-but-virtually-indestructible insulated micro wire, which ends up in a battery. Your world either has a strong magnetosphere or an incredibly high percentage of highly magnetic minerals such that wandering around in that suit charges the battery (the suit becomes a passive generator).
In the same way that a potato creates a salt-bridge between copper and zinc elements to cause electricity to flow (cool article here), the composition of the suit is such that it creates a similar bridge between the atmosphere and the body, from which electron flow can be tapped and stored. The suit, like the potato, is consumed in the process (a useful trait for any story, the suit becomes a commodity or a resource limitation).
You'll notice I did not explain how any of that could work. It doesn't matter. The question is can any of it be used such that a reader is willing to suspend their disbelief and enjoy your story. To that end, your friction solution works, too.
- The suit is designed to maximize the heat generated through friction between body parts. Thermoelectric generators sourced between the suit and the outside air temperature are used to generate electricity.
1 There are a lot of science purists on this site who believe, for reasons I literally cannot understand, that all science fiction must be based on the science fact that we understand today. We understand so little about science today that it makes angels weep — but that doesn't seem to stop some from chastising others for not adhering to it. Humbug. Good science fiction is as much about imagining the possible, even if it doesn't conform to whatever nonsense we believe we understand today, as it is about using what we understand today. 1, 2