Which statement below, is the best way to state the function of photosynthesis?

A To get rid of carbon dioxide from the plant, as it is toxic.

B To convert solar energy into chemical energy stored in glucose.

C To allow cells to breakdown glucose, thus releasing the stored energy.

D To produce oxygen.