Where to Look?
Where you should stay in Barcelona all depends on how much you want to spend and the type of surroundings you prefer. Anywhere in the center - Las Ramblas, La Ribera, El Raval, the Eixample, and Gràcia - will be conveniently located near bars, restaurants and sights.
Most of the cheaper Barcelona youth hostels and pensions are located in Ciutat Vella, the old part of town, especially around Las Ramblas and in the Barri Gótic. Some pockets are a little sketchy at night, though, so keep an eye on your belongings. Nevertheless, this area puts you right by the Cathedral and many of the main sights, at a short walk from the Born's happening nightlife to the east and the Raval's counterculture scene west of Las Ramblas. The Raval also has a bunch of hotels and hostels. Anywhere around Plaça de Catalunya, at the upper end of Las Ramblas, is pretty tranquil and highly convenient, as trains and buses to the airport meet here. Furthermore, anywhere in Old Barcelona will inevitably be a short walk from Port Vell and the beach.
A few mid-range and budget places are scattered around La Ribera, which puts you close to the water, the Parc de la Ciutadella, the Picasso museum, and Barcelona's "in" locales. This area is also a little less seedy than those surrounding Las Ramblas. (In any case, Barcelona has a very low rate of violent crime. See Barcelona safety for more).
Luxury Hotels
For Barcelona luxury hotels and a slew of mid-range options, the Eixample is ideal. You'll be right in the core of modernista Barcelona, and close to important sights like La Sagrada Familia, La Pedrera, La Manzana de Discordia and the Fundació Tàpiés.
Hotels by the Beach
There are surprisingly few beachside options unless you're willing to spend an arm and a leg, in which case the Grand Marina Hotel or Hotel Arts Barcelona are ideal. The former is located right on Port Vell; the latter occupies a soaring tower at the Port Olímpic and is owned by the Ritz Carlton.
Lastly, for a neighborhood feel and a wide offering of bars and restaurants, Gràcia is a wonderful option. Here you'll escape the tourist rush and find a number of budget/ mid-range options. You'll be close to Park Güell to the north and the Eixample to the south.. If you don't mind hopping on the metro to get to the center, Gràcia might be right for you.