Yes it is legal. The Costa Rican Central Bank announced that bitcoin and cryptocurrencies are not regarded as currencies, and are now not backed by using the government nor laws. However, they are no longer illegal. There are a few merchants who do receive bitcoins in the country.