I’ve stayed in my fair share of hostels in the time I’ve traveled, and almost across the board I’ve had great experiences. Rooming in hostels is a great way to meet new people, get tips about the city you’re in from the staff, and (usually) not break the bank. 
But staying in a hostel almost always means sharing space; whether you’re in a 4-bed ensuite or a 16-bed with an exterior bathroom, you’re probably going to be hanging out—and sleeping—with strangers (come on, you know what I mean). Here are 3 things to keep in mind to keep you from being that person the other sleepers complain about to their new friends at their next hostel. 

-Say “hello.” One of the best things about staying in hostels is its social atmosphere. Someone new coming into your room? Are you sitting alone at the hostel bar? Ask others about their trips—where they’re coming from, where they’re headed, what their favorite place has been. Chances are that you’ll be met with enthusiasm and interesting stories. Even better, you might share part of your itinerary with that person, so you can swap tips and recommendations! It’ll be pretty clear whether he or she wants to chat, though, so if you get the cues that they need to some alone time, maybe give it another try later. 
-Do your part to help keep common areas tidy. Some hostels are better staffed than others when it comes to cleaning up. A few places I’ve stayed in have dishwashers for the included breakfast; others have a strict “clean up after yourself” policy. Good hostels usually clean communal bathrooms once a day, but the level of sanitation can vary. Obviously, when you have dozens of people in and out of a tiny bathroom with an even tinier shower every day, or using a communal kitchen to prepare meals, it can be hard to keep things clean. Basically, if you make a mess, clean it up. This is a kindergarten rule: if you shower and water gets everywhere, sometimes there will be a mop or other type of squeegee-esque thingamabob. Use it. If you’re cooking and your sauce spills all over the stove, don’t just shrug and eat your pasta without wiping it up. Or, if you are staying at a hostel with a cleaning staff, inform the front desk so that they can take care of it before it affects others.
If you consider only one of these three suggestions, please let this be it:
 -Respect sleep time. Yes, I get it. It’s a hostel, not some 5-star hotel. But guess what? That doesn’t mean you can leave courtesy at the door. You never know when your dorm-mates are rising early for a morning flight, or perhaps are trying to rest up while battling a cold. Or maybe they just want to sleep. I refuse to accept that I won’t ever get a good night’s rest at a hostel just because it’s a hostel.
So what does that mean? Be mindful of your noise level. If you come in at 1 a.m. and people are sleeping, don’t read that as your opportunity to make it into Guinness for highest decibel level produced by a human. Does that mean no talking at all if you’re trying to communicate with your buddies? No, of course not. You don’t need to learn Morse code to use with a flashlight and sheets just to remind them what time you’re rendezvous-ing in the morning. Whisper instead. If you come into the room loud and drunk, you don’t get a free pass or anything but I won’t envy your morning.
Light. We’re not at the beginning of Genesis here, people. If you walk into a dorm room at night and the lights are out and you can make out a figure on the bed, turning the entire room light on is NOT okay. If you need some visual aid, use your cell phone, or a flashlight. If you have neither, consider propping the door open a bit to let hallway light in so you can grab your toothbrush or whatever, and then consider purchasing a travel flashlight (or download a flashlight app for your phone). Invaluable for situations just like these.
Ultimately, it all comes down to respect. Respect that you’re sharing a space, and think about the golden rule. Would you want to be woken up at 4 a.m. by a bright light and loud voices? Do you want to get somebody else’s hair from the shower drain stuck on your feet? No hostel will be perfect, but the more people think about simply being aware of others, the better everyone’s experience will be.