Let's start with rain in Panama in general and then go to specifics in Bocas del Toro. First Panama has a tropical climate. In general dry season lasts from mid-December to mid-April. The wet season last the remaining months. Therefore it rains around 9 months out of the year here. Having said that, the rains usually last for a couple of hours a day and not necessarily every day (keeps the country green). The rain tends to be gentle and warm, no monsoons here! Sometimes when a hurricane is beating it's way up through the Caribbean into the Gulf of Mexico, Panama gets heavy rains that could last all day - or several days. This is fairly rare though. Some interesting notes are that rains tend to fall in "pockets". It can be raining heavily in Panama City and in Arraijan (where I live and a 15-minute drive), the weather will be sunny. Another peculiarity is that when it rains on the Pacific side of Panama, the Caribbean side is dry and vice versa.
Now on to Bocas del Toro. Having lived there, I can verify that rainfall in the islands follows the general Panama pattern. The one exception is that when a storm blows up through the Bay of Almirante from the Chiriqui Grande area, it is best to take cover. These squalls often have very heavy rain and high winds which cause high waves that hit the waterfront. I once saw one of these storms deposit a 40-ft Catamaran on the street bordering the waterfront. In perspective, that means the boat was lifted up around 10 ft and left about another 10 ft inland.
The Weatherbase service defines the Bocas climate as "equatorial" with a Koppen Climate Classification of 'Af'. The service states that Bocas gets an average of 334 rainy days a year. January gets the most at 30, February the least at 26. The average annual rainfall in Bocas is 131.9 inches. There are an average of 56 days with thunderstorms.
So the overall conclusion is that rain should not really impact your decision to spend time in Bocas. Or in other parts of Panama for that matter. Unless of course you are allergic to rain...