Imagine you have been kidnapped by a mad mathematician. This mathematician has you locked in a room and has told you that you have 24 hours to answer a difficult math problem. This problem is so difficult only those with Phds in mathematics would have confidence solving it (similar to the problem on the board in the Good Will Hunting movie). If you answer correctly, he will let you leave and give you $1000,000. If you answer incorrectly, he will kill you. However, the mad mathematician has kidnapped 100 people who have Phds in mathematics. The mad mathematician says you can ask them for the answer, but it is you that has to give the answer within 24 hours.
You do not have a Phd in mathematics, so you lack the knowledge and education to solve this problem. Therefore, you ask the 100 mathematicians. 97 of the mathematicians tell you the answer is 1. The other 3 of the mathematicians tell you the answer is 2.
Time is up. What answer do you give the mad mathematician?
I think the immediate reaction we should have is to tell the mad mathematician that the answer is 1. Even though it is possible that the 3 are right and the 97 are wrong, it is most probable that the 97 are right and the 3 are wrong. One may object that this is merely appealing to popular opinion. But since you lack what is needed to answer the question yourself and do not have the time to learn what you need to, then you need to appeal to those that do.
But even when mathematicians are confident in their field they can still make mistakes. However, how probable is it that 97 of the 100 mathematicians made the same errors that led them to answer 1? Or how probable is it that 3 of the 100 mathematicians had made an error? I would say that the latter is much more probable than the former. So probable that to answer 2, given what is at stake, would be highly irresponsible.
Now let’s consider the 97% consensus on climate change. The 97% consists of climate scientists. Similar to not having the time or ability to analyse the evidence ourselves, we need to appeal to those that do. And since this is the case, the rational position to take is the one that is line with the 97% of climate scientists. To take the contrary position would be analogous to telling the mad mathematician the answer is 2.
Of course, such arguments would fall on deaf ears against those who deny the existence of the 97% consensus (skepticalscience.com gives a helpful answer to this here: https://skepticalscience.com/global-warming-scientific-consensus.htm). However, this thought experiment ought to demonstrate when appealing to consensus is the rational position to take from a lay person’s standpoint.
Not only issues regarding climate change, this approach is relevant to virtually all topics that require expertise that we do not possess. In the cases where consensus can be established, the rational position is with the consensus. If consensus cannot be established, the rational position is an agnostic one.
The key part in establishing consensus however, is ensuring the consensus is made up of those with an expertise relevant to the question being asked. If the 100 people were not mathematicians, but people in expertise in other fields not related to Phd level mathematics, our confidence on appealing to the popular view would be greatly diminished.
This is why consensus matters when we as lay people need to make decisions on areas outside of our expertise. My tutorial on appealing to authority and Ad Hominems goes through this concept in more detail for those interested.