The economy in Panama is great and has been for years. It's operating effectively at full employment. In fact, the country has had to institute some immigration programs to lure workers from around the region to come and fill quite a variety of positions that need more workers. This has led inevitably to an ugly, idiotic backlash of xenophobia in certain corners, but it's mostly ignored by sensible people.
Anyway, I think the reason Panama always ranks so high in these surveys is that there's a tremendous optimism in Panama that I have a hard time finding anywhere else. The middle class is growing, fast. Contrast that with most other countries you can think of. It's amazing what happens to an economy when the segment of people who earn money and spend all they earn is systematically encouraged to grow. Countries with stagnant economies should try it some time.
I don't know how happy these other people are (they seem pretty happy to me), but I've detected a similar optimism in Colombia, Chile and Uruguay. I would recommend any of the above countries to the traveling happiness seeker.