They open on the 15th of the month 5 months ahead of time and are booked up in less than 5 seconds. This is for upper/lower pines.
There used to be first come first serve campgrounds, but not sure how they handle those now.
Either way you are in for a treat. Half Dome is my all time favorite hike. We would usually get hiking early (~6am) and eat lunch on top of half dome, then we’d be back down by late afternoon/early evening. Some people backpack and there is a campsite halfway up the trail. Bring gloves in case there isn’t a pile of gloves at the cables.
If you are going in May/June or possibly July if the water levels are good it is definitely worth it to take a relaxing float down the Merced. It is stunning. Also, bring bikes if you can. It is definitely a convenient biking national park, even for kids. You can probably rent them too.