How does energy plants make during photosynthesis get passed to predators?

The plants are eaten by herbivores (plant eaters) and omnivores (plant & animal eaters) which are in turn eaten by predators