It kind of depends on what is used chemically to treat it. For example, creosote would be completely off limits for my garden. Some of today's treated lumber has less impacts to the environment than the heavy chemical loaded pressure treated lumber in the past.
Pressure treat is different depending on intended use:
Exterior Above Ground, Coated with Rapid Water Runoff
Exterior Above Ground, Uncoated or Poor Water Runoff
Ground Contact, General Use
Ground Contact, Heavy Duty
Ground Contact, Extreme Duty
Marine Use, Northern Waters (Salt or Brackish Water)
Marine Use, Central Waters (Salt or Brackish Water)
Marine Use, Southern Waters (Salt or Brackish Water)
Interior Above Ground Fire Protection
Exterior Above Ground Fire Protection
For me, I do not use it in the garden at all, "O". Where you grow food for consumption, I absolutely would not use it.
In 2003 the copper- arsenic preservation chemical was dropped and copper and chromium came into use for treated wood. We can use copper fungicides to grow organic food and I do not find issue with it, but chromium bothers me. If plants do absorb any its so low as to be undetectable from what I have read. And that same reading indicates our bodies do not process it, but that is what little I know and it came off the internet so take it with a grain of salt. I will say the new 4x4 wood I put as posts in concrete for my garden fence gets eaten by borer bees and ants now. They are getting replaced next season.