Thermal energy, or heat, can be stored in a greenhouse by adding "thermal batteries," like barrels of water or a heat sink. These store energy as sunlight hits and warms the materials through the day. As ambient temperatures lower, like during the night, the stored energy is released in the form of heat, keeping the greenhouse warm.
Some greenhouses utilize tall brick walls built directly behind the greenhouse itself. These protect greenhouses from cold northerly winds during the day, while absorbing plenty of sunlight from the southern exposure. Overnight, the brick radiates the energy back out, which warms the adjacent greenhouse.