There is, however, the rule of comparative advantage, which means that it is better to import energy than to produce the same amount domestically, if the import is cheaper. How that is balanced against the benefit for domestic producers, I wouldn't know...
There's also a geopolitical advantage to producing it at home. Doing so provides less reason to interfere in the internal politics of foreign producer states.
Only if the calculation includes the vast benefits of domestic energy production, properly sourced, and not just the basic price of energy.
Such as keeping First Solar and SunPower in business (FSLR has lost 95% of its value).
The jobs created through installation, maintainence, R&D, manufacturing, and so on.
For example: let's say your import cost is $250 billion, but your domestic cost is $300 billion. I'd argue that you're radically better off spending the $300 billion domestically, than losing the jobs likely involved and exporting $250 billion off shore to benefit some other nation/s. There's no doubt some inflection point on that benefit, but I think it's a wide margin.
That doesn't make economic sense. That $250B isn't being vaporized: it's going to foreign consumers who are going to spend some fraction of it buying imported goods. Your goods are likely to be more competitive if an extra $50B worth of energy costs weren't spent making them. This is basic comparative advantage stuff.