Weather is probably a little better in Samui in August. But, personally, I like the wet season more as it is quite a bit cooler and things are REALLY green.
It doesn't always need to affect your vacation as often the rain is at night - or it is an afternoon thundershower that clears quickly.
Phuket Weather and Seasonal/Monthly Averages
Phuket: When to Go
Visiting Phuket might help you know a bit more about it.