Why are CO2 sensors so expensive when CO sensors aren't?
Carbon monoxide (CO), natural gas &amp; hydrocarbons, VOCs, ammonia, etc.

In this Chemistry SE answer and this Electronics SE question I discuss how the family of MOS gas sensors work. They can measure a large variety of different gasses that can react with atomic oxygen (O rather than $\small\mathsf{O_2}$). 


  I'll quote from this question:
  
  
    ...sintered composite based on the semiconductor material $\small\mathsf{SnO_2}$, which is the metal oxide. The different sensors have different admixtures and operating conditions to achieve different sensitivities to different gasses. 
    
    The principle of operation of MOS-type gas sensors is explained in Figaro sensors' Operating principle; MOS type.
  
  
  The Figaro link shows the operating principle in the GIF below:
  
   GIF (Source: Figaro)
  
  When the $\small\mathsf{SnO_2}$ is heated by the (usually 5V but not always) heater supply, oxygen in the air will dissociate at the surface and oxygen ions will stick to the surface, depleting the semiconductor and cutting off the flow of current. When a carbon-containing gas (e.g. $\small\mathsf{CO}$ or $\small\mathsf{C_xH_y}$ (but not $\small\mathsf{CO_2}$)) comes along, it will combine with the adsorbed oxygen and remove it from the surface. The more gas, the lower the equilibrium concentration of adsorbed oxygen and the higher resulting current flow through the semiconductor. 


Carbon dioxide ($\small\mathsf{CO_2}$)

The $\small\mathsf{CO_2}$ sensor works on a totally different principle because $\small\mathsf{CO_2}$ is fully oxidized carbon, it will not react further with atomic oxygen.

Instead the $\small\mathsf{CO_2}$ sensors are either solid electrolyte chemical cells like the MG-811 or newer versions (see this question) or they are Non-dispersive Infrared Light sensors (NDIRs) based on optical absorption of a certain wavelength of infrared light, using a hot filament or other light source to produce IR and a narrow multilayer optical filter to select one of the strong absorption lines of $\small\mathsf{CO_2}$. The more $\small\mathsf{CO_2}$, the more the reduction in the transmission of light in the optical path of the sensor.