There are a number of discount cards available in Barcelona, each one offering you different pros and cons. Take a look at the various discount cards and offer and click on the link to buy the one that best suits your plans.
See also: Barcelona Discount Cards Comparison
Free entry to lots of places and discounts at even more locations - but with limited time to use the card, will you get your money's worth? Check out the following links before you hand over your cash:
The ISIC card works for discounts throughout the world and it lasts a whole year. However, check first how useful it will be in the cities you'll be visiting, as it doesn't tend to be widely recognised in Spain.
See ISIC Card Discounts in Barcelona.
This card is most useful if you plan on traveling to several countries, especially on an extended trip around the world, where the card will more than pay for itself.
Note that if somewhere offers 'student discounts', the ISIC is usually not valid. I've never been able to discover what is.
The ARQUEOticket gets you in for free to the Archaeology Museum of Catalonia, the Barbier-Mueller Museum, the Museu d'Historia de la Ciutat de Barcelona, the Maritime Museum of Barcelona and the The Egyptian Museum of Barcelona
Another card from STA travel (like the ISIC card), this one is for people who have already graduated but still count as a 'youth' (that is, under 25).
Why should all those affluent students get all the discounts? STA recognises the hard work that teachers put in for relatively low pay and so provide this discount card for travel around the world.