AC uses about 10% of all electricity globally. However, that’s electricity, not energy. If you include fossil fuels burned in engines in the energy equation, it drops to closer to 1.5%. There are bigger fish to fry.
Numbers: global energy production (all sources): ~650 EJ (exajoules). Total electricity consumption is ~23000 TWh – about 85 EJ.