The sensor is mounted to the panel beneath the dash. Here's a pic from a 1990 E34:
You can see it to the right of the chime unit. I believe it's used to determine the interior temperature in order to maintain the temp set on the HVAC panel. I assume there's one on the passenger side too, but I don't recall.