Demand-side flexibility is defined as the capacity to increase, decrease, or shift a fraction of the electricity consumption in a power system. This type of load management could increase the use of renewable energy sources and the reliability of distributed energy systems. Renewable energy sources, particularly wind and solar energy, are variable in time and usually, the periods of higher generation do not coincide with peak demand periods. This can reduce the share of such renewable energy sources in the energy balance of power systems. This work presents the modeling of a distributed energy system located in Colombia with solar photovoltaic and wind energy installations, as well as lithium-ion batteries. In the model, demand-side flexibility is applied to increase the share of renewable generation in the energy balance of the system, increase the system's reliability and decrease the cost of electricity for consumers. The model is compared with a system that has no management of electricity consumption to assess the impact of demand-side flexibility on the share of renewables on the energy balance of the system and the system's reliability.