Depends on a lot of things... what's your budget, where exactly are you going?
In general mid-range and high-end hotels (anything over about 1200B night) are cheaper booked online.
The opposite is true for budget places. IF they actually have a website (most don't) you tend to pay less than the advertised price if you just turn up. A few years ago I remember paying a walk in price of 300B for a room on Ko Lanta...the online price for exact same room was 800B, over twice as much.
Whether or not to book ahead also depends on whether the hotel is very popular and/or has limited capacity. Somewhere like SUK 11 (a very good backpackers's hostel in central Bangkok) charges exactly the same price online as it does for walk in guests BUT you really need to book in advance as it's hugely popular and in practically every guidebook.
Smaller cheaper bungalow operations (especially those on the more laid-back islands) may not honor phone reservations. The problem is that once people are in, most places let them stay as long as they like. And guests often only announce they are leaving on the morning they check out. Consequently GHs never really know whether rooms will be vacant or not. They also tend to prefer to give a room to someone who is actually standing there rather than keeping rooms for people who may or may not turn up. Sounds messy but that's how it works here. Nevertheless, there's nearly always alternative accommodation to be had ...it's very unlikely you'll be stranded without a bed for the night!
To sum up, most budget travellers in Thailand don't book ahead, most upmarket ones do. If it's your first time here then booking somewhere the first couple of nights after you arrive will give you time to find your feet and decide what you want to do next.... you'll also realize how easy it is...
