Your temperature sensor could be missing. It is not uncommon for this part to be ripped off when you hit stuff in the road or in a parking lot.
Her's a workaround, and why it happens:
If you are stuck with this condition a hot day with the air conditioner not coming on because the temperature sensor has been torn off, there is a quick workaround.
strip the insulation off of a little bit of the end of each of the two loose wires and twist them together. This will make the temperature read 122 degrees, and will allow the heat to come on.
Here's what's going on:
The temperature sensor contains an electrical component (probably a thermistor) that changes resistance based on temperature. It is located in the wheel well (on my 2000 528 Touring (station wagon)) it is in the front right (passenger side) wheel well. It measures the outside temperature.
It snaps into a small molded depression in the plastic panel that is screwed into the front of the inside of the wheel well.
When it is cold, the temperature sensor has a low electrical resistance. When it is hot, it presents a high resistance. The car's temperature control reads this resistance when deciding what to do when the interior temperature is hotter or colder than you want it.
On a hot day, if you've set the temperature to a cooler temperature than the temperature inside the car, the car's computer checks the temperature outside the car. If the temperature outside the car is cooler, the car will try to cool the car by simply blowing in outside air and will not turn on the air conditioner. It's trying to save you energy.
If your outside "ambient temperature sensor" has been ripped off, and is missing, the resistance between the two wires that lead to it will be infinite (the circuit is not complete). The car interprets this to be very cold, and will display a very cold temperature (-40 degrees) on the display inside the car. The car thinks that because the resistance is high, the outside air is cold, so it will just blow outside air into the car, and will not turn on the air conditioner. The air could be very hot, which it will be on a hot day. The car doesn't know this.
If you strip the ends of the wires and twist them together, the circuit will have virtually no resistance, and the car will interpret that as very hot (+122 degrees). When the car wants to cool you, it will read that "temperature" and conclude that the outside air will not cool you, so, instead of blowing in outside air, which it thinks is too hot, it will turn on the air conditioner.
Keep in mind that this is only a temporary workaround. If the wires are twisted together, the car will ALWAYS think that the outside air is too hot, so it will always turn on the air conditioner whenever it needs to cool the inside of the car, even if the outside air is freezing.
Furthermore, if the wires are twisted in the winter, the car will always think that the outside air is hot, and will blow in outside air when you ask for heat, and will not turn on the heater, even if the outside air is actually freezing. In that case, untwist the wires so the car always things the outside air is cold. The car will then not blow in outside air but will instead turn on the heater.
I figured out this trick when driving through
The problem is NOT the air conditioner. It is the temperature sensor on the outside of the car.
This is a common problem, because the plastic liner on the front of the wheel well that the temperature sensor snaps into extends down below the bottom of the wheel well, like a small mud flap, and consequently sticks down far enough to be torn by things in the road, parking curbs, etc.
When I replaced the plastic liner piece in the wheel well, I cut the bottom part of the flap that hangs down to make it less prone to being torn off by stuff in the road.
I hope this helps. I figured this out when crossing the Central California valley in August with outside temperatures about 110 degrees and the outside temperature reading -40 degrees on the display (because the outside ambient temperature sensor was missing). Hot air from outside was being blown into the car, heating it further. Stripping and twisting the wires told the car to turn on the A/C, saving the day.