Wreckage, concerning drilling for oil, transporting oil, refining it into gasoline, you seem to think it uses a lot of energy, compared to the energy you gain in the form of gasoline. What you seem to be missing is (I'm going to make up the numbers, but the point they make is identical to if I used the actual numbers) say you want to drill for oil with the intention of making gasoline for cars. You have to drill out 2 million gallons of oil to refine and result in 1 million gallons of gasoline. It takes 50,000 gallons of gasoline to drill for that oil. It takes 50,000 gallons of gasoline to transport the oil to the refinery. It takes 50,000 gallons of gasoline to transport the newly refined gasoline to gas stations. You end up with a net amount of gasoline left over: you gained 850,000 gallons of gasoline. It supports its own production.
Now, suppose you want 50 gallons of hydrogen. (again, making the numbers up, but the point is identical to if I used the actual numbers). It's easy to make at home, so you start with 50 gallons of hydrogen, burn it to make electricity; you get the an amount of energy in electricity equivalent to 40 gallons of hydrogen. It is physically impossible to have 100% efficiency. (laws of physics) Now, you use that electricity to make hydrogen: you end up with 30 gallons of hydrogen. You have LESS than you started with; rather than more as in the case of gasoline.
Or, you start with 50 gallons of gasoline, use that in a generator to make electricity, then use that electricity to make hydrogen. You now have enough hydrogen to replace about 30 gallons of gasoline. Well, that's actually pretty generous. Given the inherent inefficiencies (many from physical laws of thermodynamics), you'll be lucky to get enough hydrogen to replace 15 or 20 gallons of gasoline. So, using fossil fuels to produce hydrogen is, more or less, dumb. The only rational reason for doing this would be to do so on a very large, industrial scale, taking advantage of efficiency of economy, for the sole purpose of displacing pollution (L.A. can have all the hydrogen cars it wants; Kansas gets the smog.) But, this would result in an INCREASED demand for fossil fuels.
Now, suppose they put a $10 per gallon tax on gasoline used for automobiles, to encourage people to be more fuel efficient (I bet it'd work... soccer moms would realize they don't need grand caravans to get groceries.) You deduce that at that price, it would be cheaper for you to produce your own hydrogen in your home. (and, this would probably be true.)
A gallon of gasoline contains roughly 125 million joules of energy. For a second, take a look at a 100 watt lightbulb. No, make that a 1500 watt electric heater. A watt is a joule per second. So, every second the heater is on, it is using 1500 joules. Every hour the heater is on, it uses 3600 seconds times 1500 joules per second = 5,400,000 joules of energy. But, rather than sell you electricity in terms of joules, the power company simplifies the size of the numbers you need to use - rather than 3600 seconds times 1500 joules per second, they use 1 hour times 1500 watts, or 1500 watt-hours which they label as 1.5 kilo-watt hours. Now, to produce 125 million joules of energy (replace the gallon of gas), you're going to need that 1500 watts running for a little over 23 hours (125,000,000 divided by 5,400,000). So, you'll be paying for 1.5 times 23.15 kw-hr = 34.7 kilowatt hours. I don't know about you, but living in NY, I pay more than most states for my electricity; 11 or 12 cents per kw-hr. (or more? I can't remember) But, let's suppose you're paying 5 cents per kilowatt hour. That's $1.736 for the energy equivalent to a gallon of gas. (But, that assumes 100% efficiency for your production method, which is physically impossible.) I'd be paying well more than even today's cost per gallon of gasoline.
Now, before you say, "wow, I'd save money", remember, the point is to reduce the need for fossil fuels. Unfortunately more than 1 gallon of gasoline (or its equivalent) in fossil fuels will be burned so that you can produce your equivalent in hydrogen to 1 gallon of gasoline. In fact, it'd probably be closer to or more than 2 gallons of gasoline burned so that you can get a gallons worth of gas mileage.
But, after this $10 per gallon tax on gasoline, you tell all your neighbors about how much money you're saving and they start making their own hydrogen as well. Uncle Sam catches wind of this and BAMM. Before your head can spin, he slaps a tax on the electricity you're using. Only two things in life are certain: death and taxes.
But, clever you has decided that you're going to produce your own electricity. I can if I want. I have 18 acres with plenty of space for a couple of windmills. I even have a stream that has enough flow in the spring that I can have my own little hydropower plant (I plan to for sh!ts and giggles one of these days - I may even be able to draw 2 or 3 hundred watts from it - if I'm lucky.) Let's see... solar... solar... I actually contemplated using solar for my hot water, but it's not worth it to me (at this time) - I've been so busy that I don't have the time to build a home-made setup for this. Believe me, it's coming in the next couple of years, but my current costs for hot water are approximately $200 for the year; this is reasonably accurate as my hot water tank is oil-fired, and I use the oil exclusively for this purpose; I heat with coal, and have propane for cooking. But, that's me. I have the space. And, I have the resources such that I can make home-made windmills, rather than purchase commercial wind-mills designed for individuals.
Now, lets suppose you actually *do* have enough space for your own windmill, and you purchase one. (lifespan ~30 years, annual maint., yadda yadda yadda, this is already too long) It's going to cost you about 10 cents per kilowatt-hour. Or, a lot per gallon equivalent of gasoline, but it's do-able. Heck, this may even give me a project to do in a few years. Since work is 4 miles away, I may just possibly be able to use a hydrogen powered vehicle on a daily basis, from my own hydrogen! Nah... I'll ride my bike.
Anyway, for the average person thinking they can use solar or wind in their small back yard to produce sufficient electricity:
Although or because wind provides only 0.2% of US electricity, the idol of wind
evokes much worship. The basic fact of wind is that it provides about 1.2 watts per square
meter or 12kW per hectare, or 5000 watts per acre of year round average electric power.
So, 100 windy square meters, a good size for a Manhattan apartment, can power one lamp,
but not the computers, tv, microwave oven, clothes dryer or dozens of other devices in the
apartment, or the apartments above or below it.
Solar to electricity: less than 10 watts per square meter, IIRC. Oh, and forget about producing hydrogen 24/7, unless for 6 months of the year at the north pole. Heck, I've even forgotten to mention... do you only average a gallon of gasoline a day? My family averages about 3 gallons a day, spread out between 2 cars. How much space do you have for this equipment to make hydrogen?? Since you seemed to be implying electrolysis, I'll point out that when we did electrolysis in labs in high school, it wasn't happening very fast. Of course, there are other methods (all of which require energy input.) This is where someone inevitably will suggest bio-chemical methods, i.e. using a certain type of bacteria or something. After a few moments of thought, even if these methods are perfected, I think I can point out enough over-sights to show this simply isn't feasible to cover the U.S. needs for consumption.
I recommend these articles for further reading
Concerning energy sources, and the myth that solar or wind are feasible in the future to supply all but a small percentage of our needs:
http://phe.rockefeller.edu/PDF_FILES/NEIrevision11june04.pdf
Concerning fuel efficiency (or, why you are NOT going to get 200 miles to the gallon) - this would apply to internal combustion of hydrogen as well:
http://www.uwgb.edu/dutchs/PSEUDOSC/200MPGCar.HTM
I hope this helps. I probably have a small error or two in here, since I used the quick reply and don't feel like proof-reading it; if that's the case, sorry.