The phrase itself first appeared in a P G Wodehouse story published in 1925. However, 'pie' had appeared in other phrases such as 'nice as/good as/sweet as/polite as pie' in American slang since the mid 19th century. Even on its own, it had the idea of something easy long before the 1920s. For example, Buffalo Bill wrote that it would have been 'pie' for the Red Indians to catch him in certain circumstances. All-in-all, it seems pretty clear that it's the eating of a pie that is being referred to rather than the making.