Chlorophyll is a crucial pigment in plants responsible for photosynthesis. Which of the following best describes its primary function?
A) Absorbing oxygen from the air to produce energy.
B) Absorbing sunlight to convert it into chemical energy.
C) Facilitating the uptake of water from the soil.
D) Protecting plants from harmful ultraviolet radiation.