Should I use hot water or cold water for eyelid swelling?

Cold. Eyelid puffiness may be from many different causes. See if you may be having an allergic reaction to something new, then take an antihistamine. Heat would not do much for discomfort or swelling in the eyelids. "old wives" may say to put wet teabags on your eyelids to absorb the swelling. Just make sure there is no vision change, redness, heat, or pain -- if so, see your doctor for further eval.
Both. Any swelling in the eyelid caused by trauma or surgical intervention should be treated with cold compresses in the first 24 hour period and then after that with warm compresses.