The yellow fever vaccine is safe and very effective. It is a live, attenuated virus, so you don't want to give it to anyone with immunodeficiency, pregnant
women, or the very young. Yellow fever is rare in Panama due to mosquito eradication, but it seems to be coming back, so I would take the vaccine, regardless of whether it is required or not. Also, remember that there are other mosquito borne diseases like Dengue, so judicious use of insect repellent and nets is always a good idea.