The colloquial phrase ‘not to be able to do something for toffee’ means to be incompetent at something, and the earliest evidence we’ve found for its usage is from 1896. That doesn’t mean that’s the first time the phrase was used, just that it’s the earliest use we’ve found so far. The phrase appears in a collection called New Sporting Stories by ‘G.G.’ in the following extract: “Flitters said that I could not ride for toffee.”
Starting from 1896 we can then trace this usage through the decades. For example, in a 1905 report of a cricket match we read that the Australian team cannot “bowl for toffee”. A 1914 article about the Great War in the Illustrated London News reports that "their opponents cannot ‘shoot for nuts’ (or ‘for toffee’, as one Tommy more expressly put it)", and Margaret Kennedy’s 1951 novel Lucy Carmichael describes “those dreary girls you get in every Drama School who can't act for toffee”.
As the 1914 quotation shows, the phrase ‘for nuts’ was used in the same way as ‘for toffee’ and at the time it was a popular way to describe incompetence. Now, however, ‘for nuts’ is rarely used and ‘for toffee’ has become the more common expression. It first appears in the late 19th century and the earliest evidence we have on file is from 1895 in William Pett Ridge’s book Minor Dialogues, which contains the line: “An' the eldest gal she thinks she can play, and, if you'll believe me, she carn't play for nuts.”
Toffee or nuts were seen as something good which might be offered as a reward. So it seems to me that the phrase means that someone is so incompetent that he or she can’t do a given task even if they are offered a reward of toffee.