Model year and engine please.
Evidently it's 1995 or earlier.
I'm wondering if it's supposed to go to a high-pressure cutout switch on the back of the AC compressor. I see the compressor's been replaced... if the cutout switch wasn't (re)installed, that connector would lie fallow. But, then other problems might occur.
Hmm...
Did you look under the air cleaner cover? Is there an emissions-related valve residing under there, perhaps bolted to the intake manifold, to which this connector belongs?
Get the factory service manual for your year and look it up:
Over the years I have collected a bunch of GM service literature. Links to PDF Scans of service and STG manuals and a links to the Parts manuals. You'll need the FREE Adobe Acrobat reader to open these files. Get it directly from Adobe here {http://get.adobe.com/reader/} If you're not...
www.gmt400.com