NIPTON, Calif. — Gerald Freeman leaned on a walking stick on a dusty hill near the four rows of his solar arrays, talking about it like an apostle on a mission. Down the road are the eucalyptus trees he planted as a potential source of biomass. And not far away, he said, he hopes to install a hydrogen system, another source of renewable fuel.

It’s all part of Mr. Freeman’s unlikely dream here in the Mojave Desert — to turn this tiny town into a community running on clean....