Sun and other stars use hydrogen as their main fuel source along with other element such as helium. For existence of life hydrogen gas is not directly used like oxygen and carbon dioxide. Thus there is very less need of free hydrogen in earth's atmosphere and thus hydrogen is present in the air in traces.