Liver function in newborns is crucial for processing bilirubin and metabolizing nutrients, but it is often immature, leading to conditions like neonatal jaundice. This immaturity gradually resolves as the liver develops over the first few weeks of life, allowing for normal metabolic and detoxification processes.