Best time is early to mid June, as many of the attractions don't open until Memorial Day, and tourist traffic starts getting heavy towards the end of June and keeps building until the Sturgis Rally (Aug 4-10). It's also nice after mid-August, however it can start getting a bit cool after mid-September, and any time after July 1 you may run into high fire danger (campfire bans and smoke in the air).
I'd recommend Custer State Park for a nice variety of campgrounds and good access to Black Hills attractions. There are many other great places, however.