If you are single and of relatively low enlisted rank, the choice is pretty simple. You will probably not be allowed to live off-base at government expense. Note that I didn't say you would not be allowed to live off base. After you get to your first permanent duty assignment, most commands will allow you to move out of the dormitories/barracks and move off-base, if you want. However, the rent (and utilities, etc.) will have to come out of your base pay. You won't receive a housing allowance, nor, in such cases, will you receive a food allowance (you will still get free meals, in the chow hall, however).
When I was a young troop, the choice wasn't as easy. Back then, living in the barracks/dormitories meant that you (depending on base and service branch), would have to share your room (about the size of a large bedroom in a family home), with one, two, or even three roommates. Sometimes the bathroom was a "gang latrine" located down the hall. Many young troops decided to trade new car payments to live off base with relative privacy instead. Add this to the ancient custom of first sergeants and other NCOs (and petty officers), busting into your room whenever they dang well felt like it for an inspection, convinced many a young military member that off-base was the place to be, even if they had to pay for it.
Today is a different story. Other than training bases (such as basic training and job training), and deployment locations, such as Iraq and Afghanistan (where you're not allowed to move off-base anyway), all of the services (except the Marine Corps) are striving to give all junior enlisted members a room to themselves (Note: The Marine Corps goal is to give all junior enlisted Marines a room with just one roommate, and all NCOs a room to themselves).
The services are doing pretty well at this, too. Today, all Air Force junior enlisted enjoy a single room at most bases, and the Army is just a little behind the Air Force. The Navy can pretty much guarantee a single room for junior enlisted assigned to shore duty, and they are working hard to give rooms to junior enlisted assigned to ships (when the ship is in port). They're not quite there yet, but they are working hard on it. Many bases (in all the branches) are converting to more modern dormitories, which include two to four bedrooms (one service member assigned to each bedroom with a private bath), with a shared living room and kitchen (when I was a young troop living in the dorm, there was no way you were allowed to cook there, and the living room was a large "dayroom" shared by everybody on the floor). While inspections still happen, these days they are much less frequent, and more than not, they are announced in advance, and not nearly so "white glove."
Some locations even allow enlisted members to move into on-base family housing, if there are spare houses available, after offering them to all the members living with dependents. For example, two single members would live in one two-bedroom on-base house.
As you make more rank, you can usually choose to move out of the dormitories and off-base at government expense. In this case, you would then receive the above mentioned housing allowance and monthly food allowance (however, you can no longer eat for free in the chow hall -- you'll have to pay for any meals consumed there). It varies from service-to-service and base-to-base (depending on how much dormitory space that base has), but in general, you can expect to be allowed to move off base and get paid for it, when you make the paygrade of E-4 (over 4 years of service), or E-5.
At most bases, junior officers are given a choice of living on-base, or off-base at government expense. Some bases don't even have on-base single junior officer quarters. At a few bases, they may be required to live on-base. Generally, on-base single officer quarters are pretty nice (sometimes they are like small apartments), and officers don't generally have to have a roommate.
One big disadvantage to living on-base in the dormitories is that you are not allowed to have civilian overnight guests (most especially of the opposite sex), nor is "cohabitation" allowed. So, if you are that intimately involved with a "significant other," living off-base might be the best choice, whether you have to pay for it out of your own pocket, or if the military is willing to pick up the tab.
If a single member is authorized to live off-base at government expense, they retain that authority, even if they deploy to a combat zone, such as Iraq or Afghanistan. However, the Servicemember's Civil Relief Act allows a military member to break a lease, without penalty, if they deploy for 90 days or more. Many single members terminate their leases in such cases, put their property in a storage shed, and pocket their housing allowance during a deployment (this is completely legal). The disadvantage is that you're going to have to run around and find another place to rent when you return from deployment.