Robert Freitas went through detailed calculations of how much clean energy could generated and used on earth without effecting the climate of the world. This would just be energy generated and having the waste heat not impact climate. This analysis was assuming a certain level of nanotechnology so carbon dioxide levels would be made stable. How much heat we could dump into the environment without seriously affecting the climate ? He estimates it at 10^15 watts (about half a percent of insolation). So one hundred billion people at a Western standard of living (10 kilowatts)
It is possible to derive a limit to the total planetary active nanorobot mass by considering the global energy balance. Total solar insolation received at the Earth’s surface is ~1.75 x 10^17 watts (IEarth ~ 1370 W/m2 + 0.4% at normal incidence). Global energy consumption by mankind reached an estimated 1.2 x 10^13 watts (~0.02 W/m2) in 1998. This latter figure may also be regarded as the total heat dissipation of all human technological civilization worldwide, as distinct from the ~10^12 watt metabolic output of the global human biomass.
Converting the limit to the amount of nanobots
The hypsithermal ecological limit in turn imposes a maximum power limit on the entire future global mass of active nanomachinery or “active nanomass.” Assuming the typical power density of active nanorobots is ~10^7 W/m3, the hypsithermal limit implies a natural worldwide population limit of ~10^8 m3 of active functioning nanorobots, or ~10^11 kg at normal densities. Assuming the worldwide human population stabilizes near ~10^10 people in the 21st century and assuming a uniform distribution of nanotechnology, the above population limit would correspond to a per capita allocation of ~10 kg of active continuously-functioning nanorobotry, or ~10^16 active nanorobots per person (assuming 1 micron3 nanorobots developing ~10 pW each, and ignoring nonactive devices held in inventory). Whether a ~10-liter per capita allocation (~100 KW/person) is sufficient for all medical, manufacturing, transportation and other speculative purposes is a matter of debate.
Of course with advanced technology it will be trivial to travel around and colonize the solar system and use the resources of the solar system.