The availability of Energy is one of the vital requirements for a settlement on Mars. It cannot be brought from Earth in large amounts, with the possible exception of nuclear fuel. An autonomous colony would need its own energy sources. Energy production facilities are linked to the energy users, such as propellant production or food production by the settlement energy distribution system.
Since most energy sources are not available continuously, some energy storage is required to keep plants alive and production processes running. The larger the colony, there more thermal inertia it will have, so the less energy storage will be an issue, as long as production processes can be reduced during the night.
Energy demand on Earth varies significantly from country to country. In Canada and the US, the Primary Energy demand is about 360 GJ/a, or an average of 10 kW per individual. This includes all demand for production, transportation and heating.
A typical growing Mars settlement, with a population of 1000, producing most of its own food, might have a demand structure similar to this:
|Energy use||GJ/day||GJ/a per
|Propellant||32.64%||1718||615||20||Production of propellant for 40 ships over 2 years|
|Transportation||0.11%||5.7||2||0.1||Mostly geological exploration|
|Colony||8.21%||432||155||5||Heating and lighting of habitats, some In-situ resources production|
|Mining||1.71%||89.8||32||1||Ice and minerals extraction, tunnel digging|
|Food production||57.34%||3018||1080||34||Food for 1000 people, entirely artificial lighting|
The demand is six times higher than for a developed country on Earth. Most of it is used for food and propellant production.
Solar panels provide electricity out of sunlight. This source of energy is currently utilized by the majority of space probes, including the Mars Exploration Rovers. Maintenance effort is low, but hi-tech processes are required for their production. The availability strongly depends on the weather conditions and the daytime. Seasonal variations are significative and must be taken into account. Performance decreases with higher latitudes. Dust storms can last for months during which solar panels are reduced in power. solar availability goes down in winter, when the greenhouses need the most energy for lighting, and it might make sense to reduce food and propellant production during winter for a solar powered settlement. The solar energy reaching the surface of Mars is less than half of what reaches Earth. Solar Concentrators may be used to increase the efficiency of solar energy devices. However, these do not work well with diffuse sunlight.
Thermocouples provide electricity out of temperature differences. Thermocouples are used is RTGs, but can also generate electricity out of the temperature difference between the Martian surface and deeper layers. The amount of energy produced with this technology is sufficient for powering sensors or small gadgets for information technology.
New research is done by scientists of the Fraunhofer Institute. They have found a way to use thin electroconductive polymer foils to generate electricity. Those foils could be laid out on large areas and covered with a thin layer of regolith, which is heated up by the sun during the day. 
Wind turbines provide electricity out of movements of the atmosphere and can produce large amounts of energy. Dust storms may have abrasive effect on the rotor blades, increasing the maintenance effort. The availability strongly depends on the weather conditions. This energy is often available during the time that greenhouses need additional energy for lighting.
The atmosphere of Mars is 50 times less dense than the atmosphere of Earth. Thus wind turbines on Mars would generate much less energy than comparable wind turbines on Earth operating in comparable wind velocities. Two elements must be modified: The rotor blades must be enlarged to make up for the thin atmosphere, maybe with a different shape, and the design wind velocity must be increased. Studies done up till now seem to show that martian wind production is not competitive with solar, if the solar is combined with a sufficiently efficient energy storage system.
Nuclear power has been considered as the preferred energy source for most plans for medium- to long-term human expeditions to Mars. It does not depend on weather conditions. The availability of radioactive resources on Mars is unclear. Due to the vast effort of the nuclear enrichment process, the nuclear fuel must be brought from Earth until an enrichment facility can be built on Mars. (If Thorium based LFTR are built, no fuel enrichment is needed.)
Depth drilling can possibly be used to heat buildings by geothermal energy of produce electricity using steam or gas turbines. The temperature in deeper layers of the Martian crust is unclear. Volcanoes have erupted on Mars within the last 100 million years, so local areas of hot rocks are likely.
Due to the environmental conditions with very low temperatures a great amount of energy is required to heat the artificial habitat. However, insulation reduces the power consumption and can bring it down to a very low value, since vacuum type insulation should be easy to obtain on Mars.
Industry and construction
Food contains energy for human beings, and hence the production of food consumes a great amount of energy. This may be the biggest consumer of energy for the settlement. Due to the dim sunlight the greenhouses must be lit with additional energy, especially during dust storms and winter periods.
After digesting of the food there is still some energy in the feces. And at least 50% of the food produced is not eaten, such as plant stalks, leaves, etc and is biomass that can be used for various processes. Biomass and wastes can be used by certain types of waste biomass recycling.
In-situ production of propellant requires large amounts of energy. for a growing colony, this may be the largest energy demand if at least some f the food is still imported from Earth. As population of the settlement builds up, the propellant requirements go down in proportion, and food production comes to dominate the energy mix.