The best (and cheapest) option to live in Barcelona is a shared flat, so you'll be sharing the flat with other people. Costs vary, but you can get nice rooms in the range 300‐400 euros/month. You can go cheaper than this but in some cases the rooms can be awful. In any case, no matter your budget, the best thing to do is seeing the room before renting, not only because of the room itself but also to meet the people you'll be living with. In this sense, it is better to look for apartments with people who are also students, since it will make it easier living together. It is not rare to visit 3 or 4 rooms before you find one that suits youOnce you've found one that you like, in most cases you'll pay a deposit equivalent to 1 month rent, that will be returned when you leave the flat.
Idealista and loquo are two good webpages to search for rooms.
Metro, buses and trams work really well in Barcelona. Single tickets are expensive (2,15 euros), but the T10 card (10 trips) is less than 11 euros, With this card you can travel in Barcelona (1 zone) and even get to the airport using the train. (not the AeroBus). The metro works till 00:00 from Monday ‐Thursday, till 2am on Fridays and the whole night on Saturday. But if it's later than this, using the same t10 card you can take the night buses, which work the whole night, every day. Finally, it is worth mentioning that google maps works really well to plan your route in Barcelona, and it even suggests good combinations of metro and buses, having in mind the frequency of each line.
All in all, you'll be spending around 900 eur/month to live in Barcelona including a place to live, food and transport.