We have two airlines which travel between Panama City (Albrook Airport) and Bocas del Toro. Flytrip (www.flytrip.com.pa) and Air Panama (www.airpanama.com). Consult their websites to know schedules and prices of the flights.
A flight from Panama City to Bocas is usually around an hour and it brings you right into Bocas Town. This is a popular option because the flights are so short. If you do not want to fly, there are other options.
From Panama City: There is a very big bus terminal in the city, Albrook Terminal, where you can purchase tickets to Bocas Del Toro. There is an express bus that can get you to the islands in about 10-12 hours with only 1 rest stop halfway. You can catch one early in the morning, which is great because you can see first-hand the incredible and diverse country of Panama, with beautiful cloud forests, lush fields and banana trees. Or you can opt for the night bus, which some people prefer because you can sleep while traveling, which gets you to Almirante (the port city) around 7 or 8 a.m.
From Costa Rica: You can hop on a bus in San Jose or any other small town in Costa Rica, and go to the border town of Sixaola where you will cross the border into Guabito, Panama. There are a few things you will need while making the border crossing: your passport (of course), proof of leaving the countries, (both Panama and Costa Rica require proof that you will be traveling onward) and entrance and exit fees (usually between $3 and $10 USD). Once you cross over into Panama you can find either a taxi or bus that is going to the Port town of Almirante. There are many people coming and going so finding a ride is easy.