Costa Rica is a developing country. It has only 4 million people in an area the size of West Virginia or Switzerland, much of it mountainous. You would not expect that rural villages would have paved streets like Costa Rica's larger towns and cities, but this small village does have street lights, as you can see in the photo.
Costa Rica is making progress in developing its infrastructure, particularly roads. The newspapers carry articles about roads that are to be paved, and the construction of an asphalt plant in the Guanacaste region that will make it more efficient to make road improvements.
One aspect of the public works infrastructure that is important for visitors is that, unlike many developing nations, in Costa Rica the water is safe to drink and the food is fine to eat for people from the USA, Canada and Europe. I drink water out of the tap, although bottled water is also widely available. I eat fresh fruits and vegetables. Neither I nor any member of my family have ever gotten food poisoning or a similar illness in Costa Rica. That is not true in other countries I have visited