Valbuena was 33. Castillo was 37.
The crash occurred after Valbuena and Castillo left the University Stadium at Caracas after playing a game in the Venezuelan Professional Baseball League.
Officials in Venezuela said the players' SUV crashed as it tried to veer around an object placed in the road and that the crash was caused by highway bandits who then robbed the players. Yaracuy state Gov. Julio Leon Heredia said four people have been detained after being found with property that belonged to the athletes.
The players were en route to the city of Barquisimeto, where they were planning to play against Bravos de Margarita on Friday.
In a statement Friday, MLB commissioner Rob Manfred called it "a very sad day for our sport."
"It is clear by all the stories today that they loved baseball and made an impact on their teammates and the Clubs they represented," Manfred said. "On behalf of Major League Baseball, I extend my deepest condolences to their families, friends and fans, particularly those in their native Venezuela."
Valbuena played 11 seasons in the majors, including his final two with the Los Angeles Angels, who released him in August. He also played with the Seattle Mariners, Cleveland Indians, Chicago Cubs and Houston Astros.
Castillo played in the majors from 2004 to 2008, with the Pittsburgh Pirates, San Francisco Giants and Astros.