There are toxic preserving chemicals in railroad ties that can and will leach poisons into your soil. A better alternative is naturally rot-resistant types of wood, such as redwood, hemlock, cedar, or oak. Now, wood siding will eventually decay, but is generally an inexpensive choice. Most garden supply centers sell what's called cherry stone timbers, which are nicely rounded landscaping logs. You can drill holes through the ends of these logs, securing them to each other with inserted rebar, raising the bed height you desire.
Cement blocks make excellent raised bed sides.
Many come in varied earth tones now, so they do not look so starkly gray. Bricks are also a popular choice, and provide a beautiful, finished look. Natural stone is an excellent choice, and if purchased from a landscape rock yard, are very inexpensive. You can either stack the stones naturally, or mortar them in place for a more finished, yet permanent look. Many home centers now offer plastic timbers and landscaping choices.