There has been a long debate over gas and electric water heaters. First off I want to point out that there are many more choices out there than just gas or water. Some of them include choices like, tanked models or tank less, solar heated, oil heated, kerosine heated, and lastly propane. All choices might seem like good ones depending on where u live and how easily accessible fuel source is.
Oil, kerosine, and propane usually do not work well for water heaters because instead of being delivered by pipe they must be delivered by truck. In the end doing more harm to the environment then is would save you in money. So to me these are not valid options unless you live in a area that does not get electric or gas and even at that I would choose solar heated before either one because it is friendly to the environment.
Now the big choice gas or electric. The current configuration of your house will have a lot of pull in that decision. If you run and all electric house then it would pay off better immediately to stay with it. The same holds true for gas. Usually gas tends to be the cheaper of the two as far gas price per pound of gas compared to price per kilowatt hour. So that is where you must decide if you want to think of the ling run or short term gains. Both paths have there own draw backs. If you only think of the purchase of the heart itself then a electric water that would cost cheaper than a gas model would cost you more to use in the long run. Then on the other hand a gas model that you pay a higher purchase price of will save you tons of money in the long run to operate.
Now if your house has any gas appliances used it might benefit you in the long run to simple extend your gas usage to the water heater as well. They have a lovely product for this that replaces your electric element in a water heater with an outside mounted gas fired heater. Still using your existing tank as the hold tank for the water. The great benefits of this it costs less but a draw back is that it will cost more to operate then a conventional gas fired heater.
Lastly, it is my opinion that the choice should be clear. Solar powered is the way to go. Having a higher start up cost but is highly energy efficient. Using little to no energy to run it makes a good choice, but I do understand that the start up costs might be too much for some people. With many choices out there on the market anyone should be able to make a valid choice for their situation. I can only hope I have given enough ideas that you can begin your search for what product would be better for you.