Buffalo Bill state park just outside Cody has some nice spots especially in the up stream campground above the reservoir. Some sites have water and power. Further west about 25 miles in the north fork canyon Wapiti campground is nice with shade and some electricity but it might be full. Several other FS campgrounds along the road to Yellowstone but they are small and probably full, except for Rex Hale CG, which offers no shade but has some hookups so you can run your air conditioner.
There are two commercial campgrounds in town (Cody), Absaroka Bay and Ponderosa. Many other campgrounds up the north fork (on the road to Yellowstone), including Forest Service as well as Yellowstone valley inn commercial campground.
Lots of tourists around so try to get reservations if possible, or show up in the morning when people are pulling out.