If you need to spend the night in an uncomfortable outdoor environment, a tent can often provide just enough shelter to get the job done. Tents protect you from insects and light rain and can help you conserve heat. They won't get you through the harshest weather, but they can help you deal with the moderate trials of Mother Nature.
I prefer not to use a tent if I can get away with it. In the desert, you don't need one unless it is especially cold. There are no mosquitoes in the desert and little chance of rain, so just an air mattress and sleeping bag will usually suffice. You also don't need a tent if you have the back seat of a car to sleep in. It takes some training to sleep in a space that is shorter than you are, but it's still usually easier than setting up a tent. A car is essentially a hard-shell tent that will protect you in even the most extreme conditions.
Most people think they need a tent for privacy--to be able to change clothes, etc.--but this isn't a big issue for me, since I rarely use campgrounds, and I will always camp in hidden locations that aren't visible anyway. The cost of privacy (everywhere in life) is less awareness of your environment. I prefer to sleep without a tent when possible because then I can keep track of what's going on around me. If a twig snaps, I can look up and see what it is. A tent only gives you the illusion of security. Real security lies in knowledge of your surroundings.
To me, the purpose of a tent is strictly to protect me from the physical elements during the 7 hours a night when I am unconscious. It is mainly bugs and the threat of rain that will drive me to use one. I will put the tent up when I want to sleep and take it down as soon as I wake up. Typically, I do both under cover of darkness. Under ideal circumstances, no one should ever have a clue I was there -- apart from some matted grass in the morning.
On rare occasions, I may use an actual authorized campground. These are usually located in state parks. (Also National Parks, of course, but those campgrounds tend to fill up fast.) In the US, the commercial "campgrounds" you see in tourist areas are mainly for RVs. They may allow tenting, but you'll feel strange doing it, surrounded by those massive land yachts . Since even a state campground will set you back $10-20/night, it usually seems easier to camp commando-style in any piece of vacant land that seems appropriate.
See The Supercenter Camping Method for one way to find a campsite when driving cross-country (park your car at a 24-hour Acme™ Supercenter and discreetly set up your tent on the adjoining land). If you are on foot or using public transportation, you can study the aerial photography in Google Earth/Google Maps for potential camping spots on the outskirts of a city's public transportation system. Without a car, your range is limited, but you also don't have to worry about a car giving you away, so you may have more siting options. Keep in mind that fences and no trespassing signs don't show up in aerial photos, so you'll need some active field study before you know for sure that a site is suitable. (I will avoid No Trespassing/No Camping signs if I can, but I will sometimes ignore them if there are no alternatives and the chance of detection is negligible.) It is preferable to be able to survey your campsite before the sun goes down, then come back after dark to set up your tent.
I choose a tent based mainly on price, carry weight and ease of set-up. If you stop at any of the big sporting goods chains, like Sports Authority and Big Five, you can usually find a 1- or 2-man tent on sale for $25-35. (Also check the Sunday newspaper circulars.) In a pinch, Acme™ also has tents, but they tend to be a little pricey--more like $35-45. The one-man tent at the top of this entry was bought for $25 on sale at Sports Authority. It is suitable for most situations, and at that price it is semi-disposable (i.e. I can abandon it if it isn't convenient to take it with me). The most important feature of this tent, however, is that it is very light to carry and fits in my carry-on airline baggage.
I have little use for big cabin tents that sleep four or more people and that usually cost $100+. They are awkward to haul around and difficult to set up, and they are certainly not discreet. You also lose the heat advantage of a smaller tent. In a small space, your own body heat can warm the tent by perhaps 10 degrees F while it has little effect in a large tent. If I were traveling in a large family unit (which I did in an earlier life), I would use several small tents rather than one big one. This has the added advantage of allowing some members of the party to sleep even while others insist on being active.
The ideal camping spot is a field of thick grass. The grass may provide enough padding that you don't need a mattress. Of course, if do you have a mattress you'll want to use it. Air mattresses are the best, but you'll also need a pump of some kind because lungs alone may not be enough. Over time, the body can get used to a variety of sleeping surfaces, but hard ground under your tent probably won't do for most of us. You'll need some kind of padding under you.
In the Northeastern USA, you need to be aware of the risk of Lyme disease, which is caused by deer ticks that may hang out in the same grassy areas you might want to camp in. (I became conscious of this risk while camping on an island in Maine.) Here is a Lyme disease risk map. If I were camping in a Lyme disease area, I might avoid grass in favor of hard ground and a mattress. If I had to walk through grass or underbrush, I would wear long pants and carefully check my clothing for ticks before I got into my tent. (The ticks are large enough to be visible and are blocked by the tent's screening.)
To keep warm while sleeping in a tent, you just keep adding clothing and bedding. As long as you are dry, there is no low temperature that can't be addressed by adding multiple layers of passive insulation. Your first defense is your clothing: As the temperature gets colder, you can put on whatever clothing you have and as many layers of it as possible. Don't forget a hat, since your head can lose a lot of heat at night. (If you don't have a hat, use a T-shirt turned upside down, with your head through the neck opening.) Start with one sleeping bag for moderate temperatures, then add more sleeping bags as the temperature gets colder. I have camped in temperatures at low as 0 degrees F using passive insulation alone, and mountaineers obviously endure even lower temperatures on places like Everest. They have expensive lightweight sleeping bags, but apart from the difficulty of transport, many layers of clothing and several $9 Acme sleeping bags should do just as well.
All bets are off, however, once your bedding starts getting wet. No matter how many layers you have, it's not going to keep you warm. You can be camping in temperatures well below freezing with a layer of snow on your tent and still be comfortable, but if you are wet, then you could be miserable even with temps in the 70s. That's when the water protection of your tent becomes critical.
In occasional light rain, or a mere risk of rain, almost any tent will do. Tenting becomes a science only when the precipitation gets heavy. That's when you have to understand how tents work if you hope to sleep.
The walls of a tent are made of porous fabric, not plastic. A tent protects you from rain only because the water flows down the outside of the fabric to the ground before it has a chance to seep inside. Water is inherently "sticky", and it will follow the path of least resistance to get to the ground. If the fabric is always sloping downward, that the water will follow the slope and has no motivation to come inside your tent. If any of the fabric dips, however, then water will pool on the surface and drip inside.
For example, look at the tent shown at the top of this entry. At the low end of the tent (left side), there is a dip in the fabric just before the small pole. This where water is likely to collect and drip inside.
Dome tents, like the one above, have the advantage of eliminating most of the major dip points in the fabric. This tent is probably going be less vulnerable to the rain than the one at the top of the entry. However, it's still not perfect. This dome tent isn't set up on level ground, which generates pooling places along the seams at the bottom. Wherever a seam turns upward, water is going to pool in the crack and seep into the tent. The floor of most tents is non-porous plastic, so once water leaks in, it forms lakes on the floor and will never leave on its own.
It is possible that a better-designed tent instead of the rock-bottom cheapest will do better for you in the rain. It depends on the tent, and you can't be sure until you actually use it. You can also benefit from careful siting of your tent on flat, well drained ground. However, it's a sad fact that no tent is going to protect you for long in torrential or perpetual rain (like I experienced in San Diego). In times like that, you may have no choice but to move inside--to a motel, rental car or nice cave if you can find one.
In dreary places like England or New England, with soggy weather day after day, the wet is going to accumulate in your tent and bedding and never leave. At some point, you'll need an opportunity to dry out. That doesn't mean you can't camp in these soggy places, but you need a backup plan for when the sog gets to be too much.
Likewise, in tropical paradises like Hawaii or the Caribbean, the tourist brochures don't tell you about the Biblical rains or the fact that the windward side of an island gets rain almost every single day. The attraction of paradise may be diminished if you are wet all the time.
As usual, you should move to the dry whenever you have the option. If you can't do that, then you have to study how water works and develop as many backup plans as you can. Tenting may be a painless lodging option 80% of the time. It's the other 20% that you have to prepare for.