I was in in Ko Phangan between the 22nd and 29th of December. Here is my experience.
It was not difficult to find accommodation on the spot as many topics claimed. I was able to pick up a fan hut and AC room for 500 BHT till the 25th on booking.com. Both were on Haad Rin sun set beach. After Xmas the cheapest accommodation in Haad Rin jumped to 700 BHT on booking.com. Instead I walked in another place and got an AC room for 700 BHT. I payed day by day; on hostelworld.com the same guesthouse demanded minimum six night reservation and had only expensive beach hut for rent. When I left on the 29th there were two rooms available which were not shown on the web.
In Haad Rin there are also guesthouses, which are walk-in only. Sunset Road is a good address to start. Four guesthouses had plenty of vacancies every day. For New Year/Full Moon the minimum price jumps to 700 BHT. Another location is the road connecting sunrise and sunset beach and there is also a simple guesthouse right on Haad Rin pier.
Some places in Haad Rin rise their prices a lot. For example Coral Bungalows: 500 (before Xmas) - 1300 (Xmas) - New Year 2200. No need to pay this much.
If you are planning to party it is best to stay in Haad Rin. Transportation in Ko Phangan is more expensive than elsewhere in the country; traveling from other beaches cost at least100 BHT one way, after dark and during party nights more. Note: the last guesthouses that are walkable to Haad Rin are Back to Nature, Thaniza and Bird Bungalow. After them starts a hill that is a killer, believe me,
If you ride a bike the best option by far is renting a bike once arrived and start looking for accommodation by bike.
Note: New Year and Full Moon are busier than Christmas.
I also visited Thong Nai Pan Noi beach, often mentioned as an upscale beach of Ko Phangan, and was surprised to learn that after Christmas there were guesthouses renting room/hut for 500 BHT. The best option is the first ”resort” on the left side, Paradise Garden. The village seemed to be a home for roosters but here I didn't hear any screaming.
Chaweng Beach in Samui didn't look good for walk-ins. There are still some few options. In the southern end there is at least one very cheap walk-in guesthouse (near Chaweng Budget) and on the long street behind the main street there is at least one cheap looking place, also in the northern end.
I canceled my plan to stay in Ko Phangan (and Thailand) over New Year as I didn't like ”the atmosphere”. The parties I saw were tired in my opinion. In Phi Phi the nights are more dynamic.