Gardeners often use pressure-treated lumber. I prefer to use untreated material and just let my project slowly deteriorate over ten years. But sometimes you need to build something out of wood that will really last - a trellis, or a tall raised bed over concrete.
If you do, the safest bet from a health perspective is to use the most benign chemicals you have access to that suit the purpose of your project. At any rate, it's as useful to know the chemicals in the wood you use in your garden as in the food you buy at the grocery store, because those chemicals can end up in the food you grow, and some of them are pretty noxious. Chemically-treated wood means exposing your family to large quantities of copper, at best, or arsenic, at worst.
ACQ: This stands for Alkaline Copper and Quaternary Ammonium compounds. This is currently the safest lumber treatment. It requires stainless steel connectors because the high levels of copper corrodes regular nails. Treats cut ends of all Western Species (recognized by their incisor or "track" marks). The reference in the above link to formaldehyde probably refers to the glue used in glu-laminated beams - nothing you'd see in the lumber you use for garden beds. It still contains a water pollutant though, so use sparingly.
CCA: Chromated Copper Arsenic. Avoid. Until 2003, it was allowed for general residential use, but at that time the EPA decided to re-rate it for "ground contact" applications only due to concerns about the arsenic the wood leaches. Always avoid wood rated for "ground contact," because that means the manufacturers can legally use the most potent chemicals.
CC-B: Chromated Copper Boron. Don't use in the garden because borates leach out. They're intended for termite protection in sheltered areas. And the chrome is bad too. Similar to CBA-A (Copper Borate Azole).
Thompson's Water Sealer: Not a pressure treated wood system - rather a sealer that is painted on the outside. Contains known carcinogens. Not to be confused with "Thompsonized Wood," which is really just ACQ pressure-treated wood sold under the licensed Thompson's name.
Alternatives to Chemically-Treated Wood
Linseed Oil: Popular in Australia, and used by fellow Gardenaut (and my brother) Jeremiah for his raised beds. With no fungicides or pesticides, this acts more as a water-repellent and drying agent. Paint it on the boards as you would a stain, with two coats being ideal.
Studies have shown that water sealers like Thompson's only work when the entire piece of wood is coated; I would assume the same holds true for linseed oil. Once the coat on the buried side of your wood degrades, the water will find a way into the wood. You'd probably be better off not putting on another coat. The wood will last longer if allowed to "breathe" out the moisture that gets through on the backside. Another coat on the frontside would just trap it inside and hasten rot. Apply linseed oil once, then leave the wood alone to decay at its own pace. You'll extend wood life by a year or two.
Western Red Cedar: This wood is naturally decay-resistant, but also very expensive. You can use it "straight" or as cladding for chemically-treated wood or less rot-resistant wood; this can help reduce exposure to chemicals in the former and help extend the lifespan of the latter.
Redwood: Like Western Red Cedar, redwood lumber is slow to decay, but it is simply not responsible to use it anymore, since there are so many pressures to log that beautiful California forest.
Plastic Lumber: Plastic lumber is typically recycled from other plastics, usually polypropylene, which happens to be among the most inert plastics and free of the potentially harmful chemical Bisphenol-A.
The plastic is sometimes reinforced with nylon fibers for increased strength, and comes in a variety of colors. This plastic can come from a variety of sources, ranging from milk jugs to special recyclable toothbrushes (the latter grinds up whole toothbrushes into the mix, blending PP and nylon fibers in one fell swoop). When it's warm out, though, the pressure from the soil in a raised bed can cause plastic lumber to bend, meaning that a bed constructed in winter can suddenly look like it's melting. For this reason, plastic lumber needs a lot more support than wood - design that takes this into consideration can make a big difference, and a steel-reinforced product presumably addresses this problem as well. Look first for local manufacturers in your area if you want to cut down on shipping costs.
Reclaimed Materials: Nothing built from new material is truly sustainable. Even fast-growing poplar wood, billed as a renewable resource, mines its fields of nutrients, which don't get recycled into that same field at the end of the product's life cycle. Nutrients have to be trucked in as fertilizers. From a sustainability perspective, the best thing is to reclaim old wood studs from old buildings. For gardening purposes, who cares if it's a little holey? Just remember you still want to avoid pressure-treated materials here, too.
A Sustainable Attitude: Wood isn't something that lasts forever. In its natural setting, it decays, slowly releasing its nutrients back into the soil. During that process, it provides homes for countless creatures. The only way to keep it from rotting is to pump it full of chemicals. The best philosophy is to build temporary things with wood, and to build more permanent things with sturdier materials like concrete or metal. My raised beds are only six inches tall. When they decay, I'll just rip them out and rebuild them with new (reclaimed) wood. Who knows, maybe by that time I'll be ready for a different garden layout.