Why aren sunlight and wind used to produce all of our energy?
Because coal is plentiful and cheap, and there are plenty of coal plants around to burn it. There are many workers making their living by mining, processing, and shipping coal. To change to sunlight and wind will displace these workers (necessitating re-training), and it will inconvenience some pretty rich and powerful people. Also, solar is not cheap to install, and the wind is inconsistent. Power companies like to be able to control their output.