Most central heating circuits have a motorised valve which closes when the timer or thermostat switch off the heating. The motorised valve, when it is almost closed activates a switch which turns off the pump. The bang you are hearing is called 'water hammer'. It occurs whenever moving water is brought to a sudden stop. It will also happen if you shut a fast running cold tap off quickly.
The shockwave through the water makes the pipes jerk, hence the bang and rattle.
Can be muted by fixing loose pipes to stop them rattling. Also see if the pump will run on a lower flow setting.
Depending upon system, this problem can be cured by making the timer and thermostat switch off the pump at the same time the motorised valve is instructed to close. The water will have stopped circulating by the time the motorised valve shuts.
Geoff deep inside Wales
September 2010