The rainy season runs from May to November but gets progressively more rainy towards the end (September and October, are the wettest), at least for most of those places. One exception is that the Caribbean is the driest during October. We have a lot more detail in our post, Weather in Costa Rica: What You Need to Know, including some rainfall charts. Based on the locations you listed, we would say the month of June would be your best option. But it is the weather after all so be prepared to get a little wet. Overall it hardly ever rains all day and you can usually get some sun in the morning (when most activities and tours take place) and expect some rain in the late afternoon. Have fun!
Answer for Best month to visit Caribbean & Pacific regions