No, an electric tankless water heater is not deductible nor is it eligible for the Home Energy Credit. It is an improvement to your home so you can add the cost of the improvement to the Adjusted Basis of the home when the home is sold.
maybe
see this link because there are minimum standards that must be met
https://www.energystar.gov/about/federal_tax_credits/water_heaters_non_solar
form 5695 line 22a
Being tankless, by itself, does not qualify it.
However, any gas, propane or oil-fueled water heater qualifies if it has an UEF of 0.82 or higher or a thermal efficiency of 90% or higher.
Provides that a natural gas, propane, or oil water heater must have either a Uniform Energy Factor of at least 0.82 or a thermal efficiency of at least 90 percent to be considered energy-efficient building property.