It's by no means dangerous in Phuket or Phi Phi, unless you're foolish enough to go pootling about in a longtail boat in the middle of a raging storm, but you're taking a chance with the weather. Maybe it will be sunny, maybe it will rain nonstop, most probably you'll have clear mornings and rain in the afternoons.
There's no need to go all the way to Bali if you want better weather: east coast Thailand (eg. Ko Samui) and Malaysia (Perhentians, Redang, Tioman etc) are all at their best in July.