Burning paper is actually a chemical reaction which involves exothermic reaction. The heat is released. Paper is burned oxygen from the air contains carbon and hydrogen. After burning it turns to solid ashes and smokes. Sun does not burn as paper or cardboard do. The sun glows because of the process called nuclear fusion. When one proton smashes into another proton and releases some energy. So that it appears a yellowish colour.