The World Health Organisation (WHO) has some good advice on the subject. I've tended to use their advice in the past when travelling to areas with a malaria risk.
According to their advice (which I've posted below), both areas are type II which means they recommend taking a basic chloroquine prescription. This medication doesn't seem to have much in the way of major side effects (at least when I've taken it).
The Lariam (mefloquine) mentioned by opalobsidian can have some pretty evil side effects which last a long time. The problem is you only take one pill a week, so the medication takes a long time to be flushed out of your body. That said, I've taken it on several occasions when travelling to high risk areas (East Africa) and had no side effects. The WHO doesn't recommend it for the places you are visiting.
WHO advice:
Costa Rica: Malaria risk-—almost exclusively due to P. vivaxoccurs throughout the year in the provinces of Limón and Puntarenas, with highest risk in the cantons , Guacimo, Limón, Matina and Talamanca (Limón Province) and Garabito (Puntarenas Province). Negligible or no risk of malaria transmission exists in the other cantons of the country.
Recommended prevention in risk areas: II
Honduras: Malaria risk—predominantly due to P. vivax—is high throughout the year in the provinces of Colón, Gracias a Dios, and Islas de la Bahía; and moderate in the province of Atlántida.P. falciparum is highest in Colón, Gracias a Dios, and the Islas de la Bahía.
Recommended prevention: II
Malaria Risk Type of prevention
Type I
Very limited risk of malaria transmission. Mosquito bite prevention only
Type II
Risk of P. vivax malaria or fully chloroquine-sensitive P. falciparum only. Mosquito bite prevention plus chloroquine chemoprophylaxis
Type III
Risk of malaria transmission and emerging chloroquine resistance. Mosquito bite prevention plus chloroquine+proguanil chemoprophylaxis
Type IV
High risk of falciparum malaria plus drug resistance, or moderate/low risk falciparum malaria but high drug resistance. Mosquito bite prevention plus either mefloquine, doxycycline or atovaquone/proguanil (take one that no resistance is reported for in the specific areas to be visited