Can energy credit be taken for water filter/softener that improves the efficiency of a tankless water heater?
No.
No, the energy credit is reserved for specific purchases, and while a water heater may qualify, the filter does not.
Here is some more information you may find helpful: 2024-2025 Energy Tax Credit: Which Home Improvements Qualify?