Dorm the first year. You get used to living "on your own", but without all of the responsibilities of monthly bills, groceries, etc. Plus, you get to socialize with other people. Not all dorms are party-central. Even the dorms that are known for parties take breaks. No one can party 24/7.
In terms of living with another person, set up rules at the beginning of the semester. ("I like to be asleep by ten o'clock every night, so please don't have people over after that.") Most people are not jerks and will respect basic rules as long as they are reasonable. Make compromises. For example, if you want to go to sleep, but they are still awake, ask them to use their headphones and as little light as possible.
If you need to study and your roommate is being a pain, there are many places outside of your room you can go. A lot of dorms have designated study areas, with tables and chairs and white boards. There is also the library. Random floors on academic buildings are great, since so few people go through them.