An apple, being spherical and smooth, is one of the least sharp objects one could find. The phrase "sharp as an apple" therefore means that the subject is slow mentally. An idiot. It can also be used in a self-deprecating manner whenever someone comments on your failures, though typically it helps if you don't actually believe you are.
Guy 1: Hey man, what do you think would happen if I stuck my hand in this blender and turned it on?
Guy 2: You really are sharp as an apple, you know that?