The rainy season coincides pretty much with the hurricane season--May through November so you can improve your odds by going between December and April. However, I've been twice in April and had rain both times. But I think you will find the temperatures a little more agreeable in the "dry" season.
Hey Rick can you explain a little better (I'm slow) Living in So FL our rainy season is June-Aug. Down there you think the first week of Oct is pretty wet? From all I could find on weather.com etc Oct is the wettest month for many of the ports on the Panama Canal trip. Does that mean wet as in our "Afternoon thunderstorm that blows over in 15 min" or rain as in Georgia dreary cloudy rain all day weather? When is their "dry" season? dec-Apr?
Rain is almost a certainty in October; but like I said, I've been twice in April and it rained both times; but not all day--just afternoon thunderstorms. And I imagine it would be pretty much the same in October.