Obviously, producing hydrogen from methane to power cars is a stupid idea if your goal is to reduce greenhouse gases.
However, pure electric cars are only successful in some niches, and larger vehicles like buses and lorries just aren't practical yet, whilst hydrogen buses are already a thing. Battery technology has come a long way, but the energy density is still absolute garbage when you compare it to the energy density in any fuel.
If you can produce hydrogen directly from solar power, then the overall efficiency may be less important: the advantages of greatly increased power density, and ease of refueling may make it more appealing.
For battery-powered cars to be the long-term solution, and not just a stop-gap measure, there will need to be a massive breakthrough, to the point that energy densities can be compared with other fuelds.
As petrol/diesel cars are phased out, there will be an increasing number of customers whose needs cannot be met by the current state of electric vehicles, and there will need to exist another option. At that point, maybe hydrogen won't look like such a bad bet...