Orange County officials have identified the victims as Darian Davis, 17, and his brother Dustin Davis, 19.
Friends said they were all hanging out at a house when the two brothers decided to go home.
Investigators say a short time later, the boys were walking on the tracks when a train blew its whistle and pulled its emergency brake, but couldn't stop in time.
Friends told ABC11 they were surprised to hear the boys were on the tracks.
The incident remains under investigation.