It varies with where you are and what time of the year. So, it is best to bring a variety of clothes from shorts to something for the mountains at night.
The climate is tropical and subtropical; “dry” (less rain)season (December to April); rainy season (May to November); cooler in the highlands.
But, even when it rains, it does not mean it rains a long time.
The beaches are tropical. Daytime temperatures are in the high 80’s F to mid 90’s. The rainforests are hot and humid, but the cloud forests are cool and moist. San Jose is 78 – 80 as it is in the central elevated area. On the other hand, you can visit the mountains where the temperatures may not reach 65 degrees during the day and can be in the high 40’s to low 50’s at night with plenty of fog.