Going by train will be safe. My kids used to take the train to San Diego every other weekend to visit their dad, and I would take them to the Anaheim station. If you do take the train you can always take a taxi or Uber to Disneyland. I'm with the 'rent a car' camp, though. I like the flexibility of time with a car. I'm also prone to exploring, so it would be easy for me to drive, spend the day at Disneyland, then drive home (Once drove from Phoenix to the Grand Canyon, then back to Phoenix to drop off a friend, then on to Burbank to drop off my other friend, before coming home to Carson, where I live. Now, THAT was a lonnnng day
)
Do what feels best for you - either choice is a good one.