The sun benefits the Earth in several ways, including giving the light animals see with or the energy needed to produce artificial light, the heat that makes life on Earth possible, and energy for plants to make food through photosynthesis of sunlight. Plants are the basis of any food chain.
Life as humans understand it isn't possible on Earth without the sun because water would be frozen. Because the Earth is just the right distance from the sun, its water is liquid. On the inner planets Mercury and Venus, any water exists in the form of steam; on Mars and planets beyond it, any water takes the form of ice.
Plants, which are called "producers" because they make their food from just sunlight and inorganic minerals, are necessary to support life. Organisms that eat other organisms, or "consumers," eat either plants or other organisms that eat plants.
Energy from the sun is stored in various ways on Earth, not just in food. Sunlight is necessary to produce hydrocarbons such as coal, which is fossilized plant matter, and petroleum, which is fossilized zooplankton and algae. Modern society would not function well without hydrocarbons. Even ancient people used the fossil fuels, animal fats, manure and wood made possible by sunlight to cook food and heat their homes.