From metrokc.gov/health/hazard
Old railroad ties are frequently used to build raised beds or to terrace slopes. This wood has been treated with creosote, a product derived from coal. Creosote has certainly proven itself as wood preservative over a long period, but because it is toxic and because it has become a restricted-use pesticide, questions have arisen about its safe use around plants.
Creosote can volatilize into the air, especially during hot weather, and plant foliage in the vicinity of the ties may be damage by the vapors. It can also leach into the soil near the ties, but it will not be absorbed by the roots and will therefore not get into the plants' tissues.
When using railroad ties for raised beds or similar areas, avoid putting plants too close to the wood. Keeping plants three of four inches away should prevent damage. Also, don't ever use creosote-treated wood in interior locations such as greenhouses, since the vapors will damage or kill plants in them.