Cabin air temp is preset on the flightdeck and then regulated automatically. The correct temp is achieved by mixing hot engine bleed air with cold (1-2 deg C) air from the air conditioning packs. the cabin is usually divided into zones, with each zone having its own temp preselect. The temp range can be from a few degrees above freezing (set on freighters when carrying perishable goods) up to 40 degs C. The reason it is kept cool on nightflights is that the pax will then not keep demanding drinks from the cabin crew!