The heat is being generated by the wire coil looped inside the solenoid being turned on. I deal with solenoid valves and switches at work all the time and they do get so hot that you can't touch them with your bare hands.
I've never had a CO2 setup (hopefully I will soon) so I'm not positive on this but I think your solenoid switch works by energizing or generating current to open letting CO2 into your tank then de energizes to close.
If its on quiet a bit then that's why it gets so hot.
Sometime at night check to see if it still hot.