If you're in the wild and you don't have shelter, you're setting yourself up for disaster. On a mild summer's evening, it'll probably be fine. But should the weather be anything less than perfect, it's important you have a means to stay warm, dry and comfortable against the wrath of mother nature. Of course, having a decent tarp or the ability to protect yourself is paramount, but it's also important to consider where you're setting up camp. Choose the wrong location and your life could be on the line, and there's a few things to consider before you start building a lean to or stringing your tent up.
Look at what's up above you
Before setting up camp its critical to look up. In a storm it can be tempting to find refuge under the biggest tree you can find, but this presents a risk. Large branches can fall under high winds, and even the heat and smoke from your campfire can be enough to dislodge large snow drifts that have collected. They're called "widow makers" for a reason, and you don't want a few hundred pounds of dead branch falling on you in the night. Your best bet is to find either a solid roof, like a cave or an overhang, or build your shelter in a clearing where you're not at risk of anything falling onto your shelter below. Just use your common sense, if you're at the base of a cliff and you're surrounded by loose rocks that have fallen, you may not want to be right underneath. Generally, you should be fine, especially if you can get in deep enough that anything falling will not land on you.
Consider what's around you
The banks of a river often seem an ideal place for a campsite, as they are flat, relatively clear of trees, and gives you easy access to a water and food source, should you have had the foresight to pack your fishing gear. And who doesn't like to sit around camp cooking up a fresh feed of fish? But be careful of setting up camp on a floodway or an easement. If a dam breaks during heavy rainfall (or is opened) upstream, in a matter of minutes your camp will be underwater. Flash floods are fast and furious, so pay attention and consider what's around before making camp. If you're in a valley or a depression alongside a stream, you may be at a risk if there's a heavy downpour, or if the snow melt suddenly gives way.
Don't forget the tiny critters
I don't know what it is about me, but I seem to always become a magnet for mosquitoes whenever I'm in the wild. Maybe it's something in my blood, I don't know, but I've always got to pay particular attention to the bugs when setting up camp. Still, stagnant pools of water should be avoided, as these are breeding grounds for mosquitoes and other insects. I'd also recommend finding a way to get up off the ground. Especially in the tropics, sand flies, ants and other critters will find you if you're laying directly on the ground, and at a bare minimum make sure you've got a groundsheet
down to give you some protection.
Be wary about heat loss
This point is especially important if you're camping in bad weather, as the cold ground will literally leech the warmth from your body if you're not careful. I pretty much always build an elevated sleeping platform when I'm camping, it acts as a buffer to stay warmer in winter, but allows the air to circulate and keep me cooler in summer. It's also important to think about the overall flow of your shelter. If it's particularly bad I'll set up a small retaining wall
behind my fire to better reflect the heat back to me, and I've even had nights where I built a roof over my fire to stop the rain from killing it completely. You can't be too careful, especially when the weather has taken a turn for the worse.
Check you're not an uninvited guest
Because of just how well a cave or natural overhang works as a shelter, you may find you're not the first visitor to want to call it home. Be very careful as you explore these, paying attention to any recent tracks, strong animal scents, and scan every inch of your new home before you let your guard down. Do not rush in, you risk surprising a wild animal, who will not hesitate to fight back with their full fury if you've backed them into a corner. If you're in the clear, great, but remember that just because they're not home now, they could very well walk right back in once the sun sets, or the rain starts. And the last thing you want to do is battle a bear or a mountain lion on their turf. It goes without saying you will need a means to protect yourself, and I'd also make sure you've got a way out, and a big fire roaring. There's nothing better than fire to keep uninvited guests at bay. Though, you may want to tone it down a notch if you're in bug out mode and trying to run a stealth camp. In this case I'd perhaps only go with a small fire, but drag in some logs and other fortifications to ensure any animals that come your way are unable to get through. Finding the right place to set up camp isn't rocket science, but there are a few best practices to follow to ensure you're not going to end up a disaster halfway through the night. Find somewhere safe, sheltered, and secure, so you can sleep soundly and get the rest you need.