Thailand is very advanced in it’s adoption of mobile technology. Around our usual itinerary – even the very small islands – there is wifi coverage in 95% of places. It’s super-easy to buy a local SIM package when you arrive at the airport (either Bangkok or Phuket); there are little booths there with very efficient, smiling staff to get you connected to the local network in a jiffy! (A very cheap jiffy too).
The other option is to check with your home service provider and see if they offer an international roaming package. This can have the advantage that you keep your own phone number, no need to swap SIM cards for a local one.
Ashore – just about everyone and their monkey have wifi in bars, restaurants, etc! Speeds are usually pretty reasonable too.