The best time to visit Panama is during the dry season, which runs from mid-December to mid-March. Snorkelling and scuba diving are also best at this time of year.
You can visit during the wet season, as it typically only rains in the late afternoon with a short sharp downpour that evaporates quickly. But avoid November, when the rainfall can be very heavy.
The Caribbean coast has some rainfall all year round. Panama lies outside the hurricane belt.