The main cause is over loading the switch with to many lights. Switches have an amperage rating and will heat up if over the recommended amperage rating.