How does energy enter an ecosystem?

A)Energy only exists within large predators
B)Energy flows from the sun to plants then to consumers
C)Energy never enters an ecosystem
D)Energy flows from tertiary consumers to secondary consumers and eventually to producers