Anything that detracts from the home will hurt its value, especially if it’s in the front yard where everyone can see it. In addition, a transformer box will make some people concerned about the possibility of electric and magnetic fields which some believe can cause cancer.
However, if you can purchase the house at the right price it might be okay to buy. You are likely going to offer the same discount whenever you sell. Contact a knowledgeable local real estate agent for their opinion.