The best time to visit Costa Rica is December to April if you want dry weather on the Pacific. May to November is the green season: greener forest, fewer people, and rain that usually waits until afternoon. There is no cold season. Elevation changes the temperature more than the month does. The Caribbean does not use the Pacific calendar.

December to April, if the plan is a Pacific beach. January through March is the sunniest stretch, and also the busiest. December is already dry, and the forest is still green from the rains that just ended. Christmas week and Easter week fill the beach towns even inside that dry stretch. Book the room before you book the flight if those are your dates.

May, June, and November are the easier months if you can put a hike or a surf lesson in the morning and you want fewer people. July often brings a short drier break on the Pacific, the veranillo, but it does not always come. September and October are the wettest months on the Pacific. If those are your dates and you want sun, look at the Caribbean instead.