Hostels are a very good way of making your budget stretch that little bit further. There are a wide selection around Costa Rica, those around the coast or in the rainforest often come in the form of little wooden cabinas. Hostels tend to be aimed towards younger travellers looking for life and a good central location.
There are also many dormitory-style options in the main towns and cities which are really cheap and welcoming. They are especially good if you are travelling alone as it is an easy way to meet other travellers. Alternatively, if you are travelling in a large group you may even be able to reserve an entire dorm room.
Whilst hostels are basic, they are generally clean and well-equipped, often with kitchens to help you cut down on spending from eating out every day. You can check out reviews of many hostels on the internet which is a good way of gaging what's hot and what's not. The best beach front locations tend to be occupied by large beach resorts and hotels but if you're prepared to stay a few streets further away, there should be a hostel to cater to your needs and your wallet.
A good starting point is the Hostel Costa Rica Backpackers in San José. This was Costa Rica's first ever budget hostel and it has gained fame and respect from all who stay there. Needless to say, many other people have now followed suite and opened up their own hostels all around the country so you'll be spoilt for choice!