My daughter is starting her 2nd year of college and I'm wondering if distributions need to be taken each year to match the year of expenses or can they be applied to prior years as well?
Withdrawals need only be equal to or less than the qualified education expenses to avoid any tax on them. There is nothing that I have found in IRS Publication 970 that prohibits a taxpayer from taking withdrawals to cover prior year expenses. It is up to you to keep track of and document that these withdrawals cover qualified expenses as outlined in the publication.
On this note, you may want to also consider the coordination of education benefits (for example, the deduction for tuition or American Opportunity Credit). Only one can be claimed per student per year. So you may want to consult with a tax preparer but to be safe net out the value of these credits against the balance of qualified expenses and withdraw from the 529 up to that amount.
Steve is correct in that withdrawals need to be equal or less than the qualified higher education expenses, and you need to coordinate the amount with any tax benefits you may receive. I advise clients to take the 529 distribution in the same calendar year as the expenses are paid. You will receive a 1099-Q by January 31 for the prior year's distribution.