An explanation from the Climate Reality blog:
“When I talk with people who are skeptical about climate change science, I’m often asked: “I know global warming is happening, but how do we know humans are causing the change?”
“Broadly, this question requires a two-part explanation:”
"1. We know that carbon dioxide is the reason the Earth is warming."
"2. We know that humans are sending huge amounts of carbon pollution into the atmosphere."
“More than a century ago, scientists figured out that carbon dioxide and other greenhouse gases trap heat. Since then, we’ve identified many lines of evidence that confirm our planet is warming because of carbon dioxide and the greenhouse effect it produces. Plus, we have evidence that warming can’t be attributed to other factors, like the sun. Solar activity has actually decreased in recent decades.”