By plane
AirPanama (http://www.flyairpanama.com/) Flies to David from Panama City´s domestic airport Marcos A Gelabert Albrook and from Juan Santamaria Airport in San Jose, Costa Rica.
By bus
You can take the bus from Albrook Mall terminal in Panama City to David for $15.30 a person. It's a 7 hour ride. Traveling to David by bus is probably the safest if you're traveling from Panama City. The buses usually stop in the city of Santiago on the way to David for bathroom breaks and food. Highly suggested that you try some of the food they serve at these stops. Also, you'll find a cart where they sell sweets mini chocolate eggs and another square treat called cocada, try them out.
Others destinations include Paso Canoas border with Costa Rica 1 h 30, $2, Boquete 1 h, $1.75, Almirante for Bocas del Toro and atlantic coast 4 h, $7.