Yes, you can buy tickets on the day.
But if you want discounts for party bookings you need to book in advance.
Bear in mind summer months will be extremely busy so arrive early if buying tickets on the day.