Why staying in a hostel?
I believe there are two main reasons for that: price and atmosphere. And I believe that one leads to the other: when you travel alone, everything will be more expensive so sharing rooms in hostels is a way of saving money, therefore, there's a bigger chance in hostels to meet other travelers that are traveling alone. The other way around it also works for me: my main reason to choose a hostel over a guesthouse or hotel is if I want to be surrounded by travelers, not bad if that way I also can save some euros. So up to here we have 2 of the pros of sleeping in hostels. If you are travelling alone as a backpacker there it will be easier for you to get information oriented to the kind of traveler you are: cheep restaurants, transports, trips...not only from the staff at the hostel but also from your fellow travellers, and you will also have great chances of making groups for day trips and also for longer periods. I will say without a doubt that staying in hostels is the best way to meet people, being others, transports, restaurants, trekks, day trips...
This mostly happens when oposite to what I've just said: there is not space assigned, or when people is living in a hostel for long periods of time, therefore using the dorm as if it was their room at home. I have recently been to Western Australia, and it is so common there. Added to this last bit, this hostels tend to have common kitchen areas for people to cook, which is good to save money. But also, in this kind of hostels, as weird as it might look, is not as easy to meet people, as people living in there have their jobs and no time to travel around.
There are all kinds of hostels, depending on the countries or the cities/towns. Some places are known for having really fancy hostels, like I would say Penang, while in the same country it does not happen everywhere. Other counties do not have such an extended net of hostels, like Myanmar or Sri Lanka, or the quality of them needs a bit of improvement, like here in Nepal. There are also hostels that offer free excursions and free food, or a great range of activities to make it easier to the traveler to meet others. I always have a throughout search and read many reviews before choosing a hostel ( and normally compare between 2 or 3 search engines: Hostelworld, Booking.com and Agoda) and is good to go also for hostels with good common areas!
When you travel alone for a while, at least in my case, there is a moment when you start looking for your own private room, and a good combination would be one in a hostel where there'are both dorms and private rooms. This would lead me to what for me are the main cons of being in a hostel (of course after the already mentioned ' having your own space'): security and cleanliness. I have come across of lots of lack of those lately! Security is the most important, and sometimes we don't pay it the attention we should: please always have your documentation, cards and money secured in a locker! If there are no lockers ask reception to have your things locked somewhere, do not leave them in your backpack in the room ( we are talking about shared dorms). You cannot trust the people you don't know that is staying at the hostel and also, sometimes doors are not locked with a key and people from outside can also enter ( just happened in the last hostel I stayed 2 days ago). The same goes for locker rooms when you leave your backpack if you're leaving late but have to vacant your bed earlier in the day: do ask the reception if they can keep your important stuff in a safe locker under their control. Well, this sounds as common sense, but we don't do it always, and is better to be safe than sorry.
The other main con, cleanliness, or the lack of it is also really common and normally goes accompanied or is lead by untidiness. You will find that there are places where everyone respects the others and everything is on its place, I would say that happens in hostels where people does not spend a lot of nights, or where there is a wide space assignated for everyone's belongings. Then there are hostels where people loves to spread out leaving the floor and other surfaces as if they were a war zone. Other hostels are dirty cause they are, and do not need of travelers for that. They even will tell you to take your shoes to enter when in their lives have they cleaned the place!
I also believe that the atmosphere depends on the moment: I have been to horrible hostels where it was so easy to meet fantastic people, and to great hostels with cool common areas where at that moment everyone was just doing their stuff and not mixing with others: so, all this said, it is also on you to get closer and say "Hi", we are all travellers, that is not weird although you might think it is! Who knows who you might meet ;)