Splitting water is only one step in getting electricity to move a hydrogen fuel cell vehicle's wheels. Compressing hydrogen is around 90% efficient. Fuel cells in vehicles are around 60% efficient at converting hydrogen and oxygen to electricity. And motors are around 90% efficient. Assuming zero energy costs to transport the hydrogen to fueling stations, your "well to wheel" efficiency is 35-40%. In practice it's around 30%. For battery electric vehicles, efficiency is around 60%.
And then there are the safety and performance issues. You need new infrastructure to store and transport hydrogen. You need special sensors to detect hydrogen leaks, as any odorant will damage fuel cells. Due to ideal gas law, refueling cools the nozzle. With a high duty cycle, the nozzle can freeze to the vehicle even in southern California. Most climates will need heating elements on the nozzle and/or vehicle to deal with this. Different fueling stations have different pressures, meaning that a 5,000psi fueling station can only fill a 10,000psi tank to 50% capacity. Fueling stations leak hydrogen, so they can't be in convenient locations like parking garages or homes.
Given these issues, I think for applications where batteries lack the required energy density, synthetic fuels are much more likely to win than hydrogen. Their safety issues are familiar to everyone and they can take advantage of existing infrastructure.