Barcelona is a wonderful city, but August can be hot and also humid, which doesn't suit everyone. - you could just decamp to the beach, of course!! May would be a much better time of the year to travel, especially with kids.
Used to live in Spain - August is not a good month to visit. Apart from the heat it's when most Spaniards decamp to the beach/country residence. Sept - June great. Fab city. Take sensible safety precautions. Enjoy.