The Dry Season And The Green Season
The most popular time to go is between about Mid December to Easter. It is the dry season. So you can expect little rain. It will be hot and sunny. But we personally specifically choose to avoid this time – especially the weeks around Christmas and New Years and the time around Easter. It is crowded and the most expensive time.
But you ask “best” and that is a matter of choice
After Easter the Green season (AKA the rainy season) begins. But that doesn’t mean it will rain all day every day. Also although CR is a relatively small country, weather conditions at a given time will vary between area,
The green season has its own advantages. It is less crowded. Prices are lower. The vegetation is more lush and beautiful. I personally prefer visiting Costa Rica during the green season.
A really good time for the Pacific is the end of November and the beginning of December. The rains are usually starting to taper off but things are still fresh and green.
The amount of rain you actually get will vary from region to region. In general at that time, for example Guanacaste is dryer than the Central Pacific. But in most places even in the rainy part of the year, much of the time it will be nice in the early part of the day – till after noon.
Since it often just rains in the afternoon, you usually still get many good hours for beach time of other activities. (But you can’t accurately predict exact weather you will have when you are there. You could end up with no rain at all or a few days where it rains much or all of the day…..)