Plants need sun, water, air and nutrients, and where you choose to place your garden will have a big effect on all of those. While you can bring water and nutrients to the garden, you need to pick the best spot for sun and air from the start.
While some vegetables will manage with less than full sun, most of the ones we value the most in our home gardens (tomatoes, anyone?) need plenty of sun. Your climate affects this, though: if you are in a hot and sunny climate your garden may need afternoon shade, whereas if you are in the cloudy Pacific Northwest like me, you need all the sun you can get! So, choose a location that gets at least 6-8 hours of sun but does not get overheated if your climate is hot.
“Air” really has several aspects: ventilation to prevent disease, wind protection, and pooling of cold air.
Many plant diseases are fungal in nature and good ventilation and air circulation can help to prevent them. For most gardens this won’t be a problem, but if you are tucked into a corner you might have some issues. Trade off ventilation against warmth, depending on your climate. If it’s cool and breezy in your location, choose warmth. If your climate tends towards warm and humid, choose better ventilation.
Wind can flatten young and even established plants, and blow away dry soil. If your area is windy and you can choose a more protected area, do so. Otherwise, there are many ways to provide windbreaks.
Cold air flows downhill, but can pool and cause more frost that normal if something like a wall or thick hedge blocks the flow. Ideally your garden area will allow cold air to flow away downhill, rather than trap it.
One more thing to think about when you are choosing where to place your garden is the slope of the ground. A slight slope won’t cause erosion problems, but the more sloped your ground is, the more likely your soil is to wash away when it’s not covered with vegetation. You may need to terrace your slope, or put borders along the lower edges of beds. Look out for places where water flows into your garden area from uphill, too, and make sure you can divert and make use of the water so it doesn’t damage the garden. Look into the use of “swales”, shallow ditches which slow down water flow and allow it to soak into the ground rather than causing erosion.
The slope direction also counts: a slope towards the sun can mean that your soil warms earlier in the spring and cools later in the fall. A slope away from the sun means a cooler garden. If the slope away-from-the-sun is slight you can work around it by sloping individual beds towards the sun, but if it’s a substantial slope it will make a real difference to how early you can get a harvest.