How do we know the Sun is made up of Hydrogen?

Extracted from a small discussion I had on why Vedic literature can be wrong12.

I was asked why I don't believe in religion when I believe the Sun is made up of hydrogen and helium? In both cases, I am trusting some authority because I don't have the proof to see for myself.

Of course what was written in book is not a proof but do you even have the eyes to observe the reality? We already gave you the fact but still you are trying to say written things is not a proof. So what is the definition of proof? How you believe there is helium and hydrogen gas burning in the Sun? Have you seen it? Or just you go after some news. Same things if it was in sacred text then what's the problem? With due respect, I'm saying you too have the responsibility to elaborate and research the things of our books and to show to the whole world. This is our task to make it clear to unknown person.

I tried to respond this as well I could.

No one has seen the hydrogen and helium from sun. We take photograph of sun using spectroscopy which is similar to photography but works in different electromagnetic spectrum. After looking at the photograph, it was found to be most similar to light emitted by hydrogen burning on earth. So it was concluded that sun must have hydrogen. Similarly, looking at various ranges of electromagnetic spectrum, the composition of the sun was guessed. If one or two scientist did this and said this is it, no one would believe. So many scientists conducted the same experiment in different parts of the world using the same procedure and everyone got the same result. So scientists reached a conclusion. If, any day in the future, some one happens to find out that the light/image given by sun is not actually by hydrogen but some other process and element, then this man's findings will be tried out by thousands of others, if they find out that this new explanation better explains the composition of sun, then they will abandon the theory that sun is made up of hydrogen and reach new conclusion. So in science, there is no central authority, no central book, that dictates what anything is. Science is bound to change, it will change as our understanding of the universe expands. It is possible that one day scientists realize that the universe is actually as described in purans, upanishads and vedas. But who is to say that they reach the conclusion that it is infact as described in Greek mythology or Mayan scriptures? The honesty that we do not know everything and still trying to know, through certain standard process and coming up with proofs so that others can't refute your findings is what is keeping scientific community alive. No one, not even Einstein and Stephen Hawking could claim anything without proof. That is science and I am happy to be part of it. I have nothing to say to Bijay Pokhrel though. He copied some texts and arguments for the sake of it. I'm glad that you are at least critical and open about it.

Science evolved from religion when we started asking questions. We starting searching for new answers and we found some. Some of our old anwers were outright wrong like sun revoling around earth, our earth being flat, etc. Some still hold true and others, we don't know yet. When science and religion are against each other, I always lean towards science not because science is right but because it is less wrong than religion. The relativity of wrong34 is more important than the binary scale of right vs wrong when we think about important questions.