Exhibit 23.8

Consent of Independent Auditors

We consent to the reference to our firm under the caption “Experts” in this Registration Statement (Form S-3) and related Prospectus of Hannon Armstrong Sustainable Infrastructure Capital, Inc. for the registration of common stock and to the incorporation by reference therein of our report dated March 24, 2023, with respect to the consolidated financial statements of Lighthouse Renewable Holdco 2 LLC and subsidiaries included in Hannon Armstrong Sustainable Infrastructure Capital, Inc.’s Annual Report (Form 10-K/A) for the year ended December 31, 2022, filed with the Securities and Exchange Commission.

/s/ Ernst & Young LLP

Philadelphia, PA

December 8, 2023