The energy from the sun is captured by plants through photosynthesis, a process in which the plants will produce their own food, what gives them the status of producers. Those producers then are eaten by consumers that eat plants, which are called primary consumers. The primary consumers can be, for example, small animals, which will be eaten then by larger animals, called carnivores because they consume meat. The carnivores will, at some point, die and decompose, and their energy will be then consumed by decomposers.
Therefore, the correct answer is A. Sun -> producers -> primary consumers -> carnivores -> decomposers.