It is known as Oak Apple Day from the custom of wearing oak apples (a type of plant gall), or sprigs of oak leaves, in reference to the occasion after the Battle of Worcester in September 1651, when Charles II escaped the Roundhead army by hiding in an oak tree near Boscobel House
In 1660, Parliament passed into law "An Act for a Perpetual Anniversary Thanksgiving on the Nine and Twentieth Day of May", declaring 29 May a public holiday "for keeping of a perpetual Anniversary, for a Day of Thanksgiving to God, for the great Blessing and Mercy he hath been graciously pleased to vouchsafe to the People of these Kingdoms, after their manifold and grievous Sufferings, in the Restoration of his Majesty..."
The original Church of England service may be read here. Slight changes in the service were necessary upon King Charles' death in 1685, which can be read here.
The public holiday was formally abolished in the Anniversary Days Observance Act 1859.
As Sir Charles Harding Firth, FBA, says in his The Stewart Restoration,
Though the restoration of Charles the Second was unconditional, it was nonetheless a compromise. The monarchy which was restored was not the purely personal rule which Charles I had endeavoured to establish, but the parliamentary monarchy which the statesmen of the Long Parliament had set up on its ruins in 1641. Theoretically the constitution as it existed in March, 1642, before the outbreak of the War came into force again as the basis of the new settlement. Practically any settlement must also contain some guarantee for the new interests which had developed during the last eighteen years, and it was only through Parliament that such security could be obtained. Thus, whilst it was a glorious day in that it freed the Three Kingdoms from the jackboot of a vile military dictatorship, a joyless regime which had outlawed the theatre, suppressed the celebration of Christmas and Easter as 'pagan', and torn down the village Maypoles, it would have dire consequences for the British people and their Constitution.
The Monarchy, ever the natural protector of the people, had been fatally wounded, to be replaced by Parliamentary sovereignty, placing power in the hands of an elite, first of the landowning class created by the despoliation of the Church by Henry VIII, later of the plutocracy of the industrial revolution, and now of a permanent bureaucratic class, none of whom have ever been the friends of the people.
No matter. I shall still wear a sprig of oak in honour of Oak Apple Day.