According to the Costa Rican embassy, all travelers need a valid passport to enter Costa Rica.
So before you start packing your swimsuit and sunscreen, be sure to apply for a passport (or renew your existing one). And while you're at it, you might want to consider getting travel insurance as well. After all, there's nothing worse than being stranded in a foreign country without a way to get home. So if you're planning on traveling to Costa Rica (or any other country for that matter), be sure to have your passport ready.
And if you don't have a passport yet, start the application process as soon as possible - it can take several weeks (or even longer) to receive your passport.