How does energy get from the sun to a second-level consumer?
When the sun's energy strikes the earth, plants can capture some through the process of photosynthesis. Plants are then eaten by first level consumers (herbivores). By definition, a second level consumer is a carnivore--an animal that consumes these herbivores. In this way, the sun's energy is accessed by the second level consumers.
Autotrophs (plants, producers) have the ability to capture the energy of the sun--virtually all life on earth is dependent on the ability of plants to photosynthesize. This is the process performed in plants that takes carbon dioxide and water, and with the energy of the sun transforms them into sugar and oxygen. The sugar that is a product of photosynthesis contains chemical energy. The plant itself uses some of this energy. Some is transferred to the animal that consumes the plant. The transfer is only about 10% efficient; that is, the animal can only obtain about 10% of the energy available in the plant. The rest is lost as heat. This 10% efficiency continues up the successive levels of the energy "pyramid"--10% of that available at each level is utilized by the next consumer.