After you complete level 19, you will have access to the Candy Land levels. To purchase a ticket for the first level, it will cost 5000 lums
You don't need to be concerned with being perfect for the first 2 levels.
You will need to get a perfect on all 6 normal levels, in order to unlock the nightmare versions, and get 4 teensies on all of the 6 nightmare levels in order to have enough lums to access the final 2 levels.
Like with the first 2 levels, the last 2 levels do not need to be perfect either, just completed.