Map from Google - Costa_Rica

The climate in Costa Rica is tropical hot all year round in the plains and along the coasts, while it's mild in the cities located in the plateau and the mountain slopes (tierras templadas). The Pacific coast and the plateau have a dry season (December to April), and a rainy season (May to November) in which rainfall is abundant, while the eastern plain and coast have an equatorial climate, with abundant rainfall throughout the year.
The temperature variations are low, because the country is located near the Equator, so the main difference is related to the rains. Anyway, the majority of the country is so rainy that it's covered by rainforests.

San José

The capital city of San José is located in the central part, at 1,100 metres (3,600 feet) above sea leverl, on a plateau (the Central Valley, between the Cordillera Central and the Cordillera de Talamanca), and thus has a pleasant temperature throughout the year, with cool nights and warm days. There is little rain from December to March, and it almost never rains in January and February. The rainy season runs from May to November, and the wettest months are September and October, with around 300 millimetres (12 inches) per month. The amount of sunshine is good in the dry period, but only mediocre during the rainy season, when the sky is often cloudy.
Here are the average temperatures of San José.
Average temperatures - San José
San JoséJanFebMarAprMayJunJulAugSepOctNovDec
Min (°C)141415171717171616161614
Max (°C)242426262726252626252524
Min (°F)575759636363636161616157
Max (°F)757579798179777979777775

On the Pacific coast, the rainfall pattern is similar to that of San José and the plateau, although of course the temperature is higher. The Pacific coast is even slightly warmer than the Caribbean coast, especially in winter, when the north-east trade winds descend from the mountains and become hot and dry: the average daytime temperatures are around the 30/32 °C (86/90 °F) in the least hot period, from October to November, and can reach 34/35 °C (93/95 °F) in March-April, before the rainy season.
The least rainy area of the country, where the savannah dominates, is the north-west (Province of Guanacaste), where the average rainfall drops to 1,300/1,500 millimetres (51/60 inches) per year.
Here is the average precipitation in Puntarenas, located in the southern part of the Pacific Coast.
Average precipitation - Puntarenas
Prec. (mm)64530205215175225295280130301600

Here the heat is intense throughout the year, and from February to May is torrid in inland areas, with highs around 37 °C (99 °F).
Average temperatures - Puntarenas
Min (°C)222223242424232323232322
Max (°C)343434353332323232323232
Min (°F)727273757575737373737372
Max (°F)939393959190909090909090

The east coast and the plain overlooking the Caribbean Sea (see Puerto Limón) is rain-soaked, with more than 3,000 millimetres (118 inches) per year; here the climate can be defined equatorial, that is without a dry seasons, however, there are two peaks, July and December with about 440 mm (17.5 in) per month, and two relative minima in September-October and February-March, both with about 150/200 mm (6/8 in) of rain per month. In this area, December is even the wettest month, and January is wetter than February and March. South of this coast, on the mountain slopes of the Braulio Carrillo National Park, precipitation reach 5,000 mm (195 in) per year!
Here is the average precipitation in of Puerto Limón.
Average precipitation - Limón
Prec. (mm)3052301952703253004403151452153804503565

Along the coast of the Caribbean Sea, the temperatures are a bit lower than on the Pacific coast, as the winds blow constantly from the sea, but for the same reason the humidity is higher. Here are the average temperatures of Puerto Limón.
Average temperatures - Limón
Min (°C)212121222323232222222221
Max (°C)292930303130303031303029
Min (°F)707070727373737272727270
Max (°F)848486868886868688868684

The sea in Costa Rica is warm all year round, as we can see in the following table.
Sea temperature - Quepos
Sea (°C)282829292929292928282828
Sea (°F)828284848484848482828282

At high altitude, on the slopes of mountains and volcanoes such as Cerro Chirripó, 3,820 metres (12,532 feet) high, or the Volcan Irazú, 3,431 metres (11,257 feet), the temperature is low, especially in the winter months. Above 3,500 metres (11,500 ft), at night it can freeze throughout the year.

Costa Rica is almost always spared from hurricanes, whose path is usually located north of the country, in fact sometimes they can affect the near Nicaragua; therefore the area most at risk is the northern one. The hurricane season runs from June to November, during the rainy season, which in any case is generally not recommended for tourists.

When to go

The best time to visit Costa Rica, either for swimming or for exploring its nature, rich in flora and fauna, runs from January to mid-April, and in particular the months of February and March. It's hot in the lowlands, the sun shines and there's little rain, except on the east coast, which has we said is rainy throughout the year. The capital can be visited even in December.
To avoid the uncomfortable heat of spring, the province of Guanacaste can be visited in December and January.

What to pack

For San José and tierras templadas: all year round, light clothing, a sweatshirt or sweater for the evening; raincoat or umbrella from May to November.
For plains and coasts: lightweight clothes; in the rainy season, a light sweatshirt and a light raincoat for thunderstorms.
For the high mountains: warm clothes, jacket, hiking boots.