Last year, California, the nation's most populous state and the world's fifth-largest economy, declared that all of its energy would come from renewable sources by 2045. It became the second state in the nation, after Hawaii, to set that goal.