The function of leaves in a plant is to help the plant produce food by converting the energy in sunlight into chemical energy that the plant can eat. The structures within the leaf convert the energy and make it possible for the plant to get food.