Phuket, July is similar to June, but with monsoon season well underway, rainfall amounts rise to an average of 260mm that comes down over 19 days. While you'll need a bit of luck when it comes to the weather, sunny days are still common, and a cooling breeze makes being outside often rather pleasant.
If you are looking for beaches and island hopping tours, Phuket is better since you can also go to Phi Phi Islands, James Bond Island and Krabi. Bangkok is a good option if you are looking for city vibes, night life and shopping. Plus the Safari World at Bangkok is the best if you are traveling with kids. July might not be a good season for Thailand due to monsoons, we traveled in October