This is a very affordable way to travel in Central America. There are different companies that offer their services from the main Capitals. It is possible to travel all the way from Panama to Guatemala, but there are certain things to keep in mind.
In Central America borders are not open 24 hours, so routes and times may be specific. To travel from Panama to Guatemala one has to cross through several countries. This is a great way for those who want to visit different destinations since when one buys a ticket for example in TICA Bus (one of the most popular companies) one can stay in each capital as long as one wants.
If one decides to start the trip in Panama one will have to sleep in Costa Rica, Nicaragua and El Salvador (at least) around the terminals there are affordable hotels.
The prices are very accessible, for example a trip from Costa Rica to Guatemala costs only around 100 USD including taxes.
Buses are in excellent condition and normally new. The roads are safe and most of them are in good condition. There have been safety problems in the past in parts of the route, but it is not a common issue.
It is important to keep in mind that one will be dealing with immigration formalities in different countries, and sometimes crossing borders in Central America can take a while (the bus always waits for the passengers) but one needs to be updated about visa requirements in each country.
The best thing is to contact directly any of the companies, some of the best known ones are TICA Bus, TransNICA and Turansa.