Most units in the game require Energy as part of their on going activities.
A unit's energy requirement is shown in yellow at the top center of the unit description box, next to a little lighting bolt.
At the top of your screen your current energy balance is shown in yellow. If you mouse-over this number you can see your total energy generation and how much energy you are currently consuming.
Unlike Metal and Crystal, energy is not stored so you must have enough energy being generated at all times.
If you have insufficient energy, units will no longer be able to be built.
Note that the check for if there is sufficient energy is made when the unit spawns so for stationary structures such as turrets, the check is made when you place the unit.
However, for units created at a fabricator, such as a Flagship, the check for sufficient energy is made when the Starship Constructor finished building the Flagship and it goes to leave the Starship Constructor.
This is important from a resource perspective because if you are out of energy and trying to crash-build a Matter Converter, your fabricators will still be fighting for resources trying to build new units even though they are technically out of energy.
Also, be aware that low-power mode does not reduce energy consumption any more. Under the old energy reactor system, placing a unit in low-power mode reduced its energy consumption by 90%. Under the new energy collector system implemented in patch 5.036, units always consume the same amount of power, regardless of their powered state.
Also under the new system, energy production structures can not be placed in low power mode themselves. The only way to remove the -100 Metal and Crystal drain on your economy from a matter converter is to scrap the matter converter.
While some structures, such as the Economic Command Station and Human Home Settlement do produce energy, most of your energy production will come from Energy Collectors and Matter Converters.
The Energy Collector is the preferred method as it produces 150,000 energy for no cost. In a multi-homeworld game, each Energy Collector produces 150,000 energy per homeworld.
However, you can only build one Energy Collector at each planet. This limit is per-player in multi-player games.
If more energy is required after all possible Energy Collectors have been built, Matter Converters are you only other option.
While expensive because they cost 100 Metal and Crystal to run and only produce 50,000 Energy, there is no limit on how many of these can be built.
Also make sure to defend your energy production, as energy producers are high-value units for the AI when it attacks.
If you lose energy production by having structures destroyed by the AI there are some limitations that come into play.
There is a buffer going down to -30,000 Energy.
If you eergy balance is in this zone, you are considered to be in a 'brown-out' condition. You can not build any new units or structures that require energy as your energy balance is below 0, however all your units and structures will keep functioning as normal.
If your energy balance falls below -30,000 energy, you are now in a 'black-Out' condition.
All structures that require supply (with the exception of the Energy Collector and Matter Converter themselves) stop functioning.
So your Forcefields will turn off, your Turrets and Fortresses will not fire and so on.
Note however that Tractor Beam Turrets and Gravitational Turrets will keep working. It is unclear if this is a bug or intended behavior.
Also, as your mobile ships generate their own onboard energy, they will continue to function as normal during black-out conditions and so can defend your empire while you recover your energy production.
Energy and your economy
Energy production structures are special in a couple ways:
As neither the Energy Collector or Matter Converter require energy to run they can always be built as long as you have the Metal and Crystal to do so.
This allows you to recover from an energy black out by building new energy production facilities.
Also, Matter Converters will always output 50,000 energy, regardless of the state of your Metal and Crystal reserves.
If your empire has a gross income of +50 Metal and +50 Crystal and you are running a Metal Converter which costs -100 Metal and Crystal your resource reserves will drop by -50 Metal and Crystal per tick.
Once you reach 0 Metal and Crystal, the Metal Converter will keep operating even though technically there is no longer sufficient Metal and Crystal.
Having said that, the -50 Metal and Crystal will keep your reserves at 0 and so you will be unable to build or repair any units: costs for energy production are paid before any construction or repair costs.