Is it better to go in August or early September? I definitely don't want to miss all of the Highland Games (which I believe stretch into early September) and I thought it might be fun to go to the MacPherson gathering in early August, but I don't know if that will be worth going during the peak season. I'd much rather keep things less structured and if it's possible book a hotel, B&B, or Airbnb with little notice in September but not in August, I might rather do that.
A big determining factor would be the Fringe Festival in August. If you plan to go or not, if you plan to fly into/out of, or stay in Edinburgh or not... I can't comment on the Highland games, but it gets extremely crowded in Edinburgh in August, and so hotels, B&Bs, etc... book up far in advance for the event.
Edinburgh boasts that it is the "festival" city, and here is why: In August alone there are three major festivals overlapping (International Festival, which is the original, devoted to major arts; Fringe Festival, still the model for the rest of the world; and a book festival.) At the same time the royal military tattoo occupies the fortress courtyard with bands and high ceremonial
marching and more than enough bagpipes.
This page contains a list: https://www.edinburghfestivalcity.com/#festivals
Here is a large list for Highland Games: http://scotlandwelcomesyou.com/scottish-highland-games/