Costa Rica has two distinct seasons—wet & dry.
Temperatures are affected primarily by elevation, and not time of year. The coastlines and lowlands are hot year-round, while the mountains are much cooler, especially at night. Costa Rica can actually get frost at the highest elevations, on and about the summit of Mount Chirripó.
In general, the rainy season (dubbed “the green season” by tourism folks here) runs roughly from mid-May through mid-November. That said, the rains enter somewhat mildly and finish off with a bang. I personally love traveling around Costa Rica throughout the months of May, June and July. By mid-August, the rains typically get more pronounced, and are of longer duration. September and October are typically very rainy months, with almost daily rains, often of long duration.
Locals call this “winter,” which is confusing to some, as it encompasses much of the northern hemisphere’s “summer”.
The dry season, or “summer,” runs from mid-November through mid-May. In terms of weather, December and January are prime times to visit. Sunshine is nearly guaranteed, although everything is still lush and verdant from the recently departed rainy season.
The one major exception to the above rule is the Caribbean coast, which can get rain almost any time of year, and somehow, seemingly miraculously, is often sunny and dry during September and October.
In broad strokes, Guanacaste and the northwest areas of Costa Rica are the country’s driest, with a shorter wet season, while the southern pacific zones and Caribbean lowlands are the country’s wettest areas.