It's the purge solenoid for the EVAP system. It opens at idle and while cruising to evacuate the charcoal cannister (part of the venting system for the gas tank).
One side of the solenoid will have constant power and the other will have a modulated (via the EEC) ground.