I believe the term is "half dozen of one, six of the other"! They both have positives and negatives.
As others have said, the weather is generally better in early June, but August isn't unbearable. It's no Texas in August, that I can assure you!!
I would guess that the crowds would be roughly the same at both times, more locals in June because local APs are still valid, and more tourists in August.
Main Street Electrical Parade will still be going in June, but I think will be gone before August. Some things like the train and Fantasmic should be (hopefully) open by August.
Me personally, I would like the better weather in June, and I would love to see the MSEP at DL! So my vote is June.
Either way you're going to have an amazing trip! Enjoy!