There are structures which are like cells within cells called organelles. A chloroplast is an example which exists in plant cells and contains a lot of a compound known as chlorophyll which processes sunlight to provide high energy compounds, eventually leading to sugars. Another example in human cells (among others) is the mitochondrion which performs the opposite role, creating high energy compounds (ATP) from sugars.