Solar-powered cars have come a step closer after scientists discovered a way to create compact fuel cells that use the power of the sun to generate hydrogen.