Using sunlight to transform greenhouse gases into valuable chemicals