First bake a tasty cake obviously... ;)
I've chosen a pattern with 2 colors, in which there seems to be depth. I made sure that there are not to many white fields connected, so too big chuncks would be cut away, othewise there would not be enough support for the stencil. This image I converted with Illustrator real simple with the 'trace' function to vectorfiles. I taped to A4 sheets together so I could easily take the stencil home.
In principle my cake was not really suitable for this, cause the creame-cheese frosting on it was a little to mosty. This made the palmsuger melt quite rapidly, which pretty soon resulted in a blurry image. The surface also was not smooth enough, which made the print not really 'tight'.
It would be best to use a dry and smooth as possible surface. If you baked the cake, put it upside down, cause the bottom is always smoother.
What also seems like a good idea to me, is to use both powder suger and dark suger so you can make a print in 3 colors.