A piece of cake is something that is very easy to achieve, a job that is simple, easy. The word cakewalk can be used with the same meaning.
My driving test was an absolute piece of cake.
The origin of the expression defers whether you are British or American.
In the USA
It is thought that this idiom originated in the 1870s when it was tradition to give cakes as prizes in competitions. In some parts of the USA at this time, slaves would participate in ‘cake walks’ where couples would perform a dance mocking the mannerisms of their masters. The most graceful couple would receive a cake as a prize. From this, the expression ‘a piece of cake’ started being used to describe something that was easy to achieve.
In the UK
This expression originated in the Royal Air Force in the late 1930s for an easy mission, and the precise reference is as mysterious as that of the simile easy as pie. Possibly it evokes the easy accomplishment of swallowing a slice of sweet dessert!
Other Idiomatic Expressions with the same meaning
As easy as pie
It was like giving candy to a baby
Une part de gâteau
Correct French idiom
Un jeu d’enfant !
C’est du gâteau !