Chlorophyll allows the plants to trap solar energy and convert it into chemical energy. In the whole ecosystem only green plants can do that. Food produced by plants are taken up by primary consumers. Secondary consumers derive nutrition from primary consumers, and so on.
Thus all the consumer organisms in an ecosystem get energy directly/indirectly from the trapped solar energy stored in plants. This is why plants are called the producers.