Try it with some numbers
Lets start with solar power: about 1.4kWatt/m². Half the time there is a planet in the way, and it you do not live on the moon, there is an atmosphere with clouds. That trims the power available to 100Watt/m² in the UK. You can bump that up a bit if you angle your solar panels towards the sun. If you spin them once per day, you can have 200Watt/m². (Source: Sustainable energy without hot air.). I will use 100Watt/m², so you can multiply it by the area of your home without having to think about the angle of your roof.
A small car can go about 17km with a litre of petrol (For example: Nissan Micra). Wakipedia has figures for the energy density of fuels. Petrol is 32.4MJoules/litre, so I can go 523m with 1MJ of petrol. 1MJ of hydrogen should take me about the same distance. Each square metre of land gives me on average 100x60x60x24=8640000J per day of solar energy. Converting to hydrogen is 12.3% efficient, so I can go about ½ km per day for each square metre of roof.
If I covered 5 by 6 paces of roof with solar→hydrogen panels I would get enough hydrogen for my transport. Someone else in the house could sensibly run a car too, but a third driver requires covering the garden.
Remember: solar power costs the most lives per mega Watt of installed capacity because DIY installers fall of the roof. Hydrogen/Air mixtures are really good at going bang. Test you hydrogen leak detectors regularly.