Depends on the Hostel. If you are in the SYHA, you should be a member, or belong to your home country's YHA. Other commercial hostels no but the standard can vary considerably. Some are absolutely excellent, whilst others are glorified doss-houses, with similar admissions policies.
If you are going to be staying in a non-SYHA hostel, I'd look for personal reccomendations first, then take a good look at the place before you decide to stay.
City/tourist-hotspot hostels can get very busy, esp Edinburgh in the summer. Booking ahead is always a good idea.
If there are a couple of you going & you can plan ahead, you can often pick-up special offers/advance prices on Travelodge type places, which are sometimes very close to a hostel in price.
