When does coming up with an idea constitute sufficient contribution for authorship? To what extent does coming up with a research idea, without contributing anything else to the actual work, constitute a sufficient contribution to be an author?

As a hypothetical, suppose a five year-old child tells me one day that he wonders if banana peels can be used to cure leukemia. I am intrigued by the idea and go and write a research proposal. The proposal gets funded (!) and I get positive results (!!). In this case, does the child deserve authorship for coming up with the idea, which I might never have considered?

On the one hand, I can say that some ideas are often very creative and novel to the point where just coming up with the idea is a significant intellectual endeavor (recognizing an unsolved problem, knowing enough theory to hypothesize what might work, knowing what has been tried in the past, using raw intelligence to put things together, etc.), while on the other hand, I could trivially write a script to brute-force-dictionary an arbitrarily long list of "ideas" and then scoop authorship on large numbers of future papers - "Umm, your paper's title was one of 43343895234 that I generated earlier this year with a script, I am entitled to have my name on your paper as an author even though I am not actually doing anything to help, since I had the idea first."

Ideas:


Coming up with an idea always deserves authorship as long as the idea was novel.
Coming up with an idea deserves authorship only when the idea-maker establishes a sufficient foundation for the idea. For example, randomly proposing a cure for cancer by picking random chemical names out of a dictionary and hoping for a jackpot cannot result in authorship, while providing a theoretical basis for why a specific chemical might work does, even if the idea-generator leaves it at that and does none of the actual experimental design, lab work, etc., or quite possibly is not even qualified to do so.
An idea is never sufficient for authorship. Proposing an idea, without doing any of the actual work, merits at most an acknowledgement or a citation ("Thanks to John McWhatever for coming up with the idea of solving the Closeability Problem by applying hyperparallelized matrices across the transverse manifold.", or "On an online Question and Answer site, Columbia (2019) proposed the use of banana peels in curing leukemia, but did not provide a theoretical basis or a practical methodology. In this paper, I demonstrate a clinically significant benefit of 10g banana peel topical tincture daily versus placebo in the treatment of leukemia....").
I will give an answer that applies to mathematics and maybe some other things. It isn't quite your second point, but close. Background first. 

Newcomers to maths think of it as a bunch of facts. You learn some of those facts in early schooling but don't get a wider view. If you study maths at a higher level you think of it as proving theorems. Some facts and a bit of logic let you derive other facts. But if that is as far as you go, then you really aren't yet a mathematician. A mathematician is a person with enough insight into the workings of the thing that they can propose things that might be theorems if they could only be proven. But this isn't, to a mathematician, just making random statements. There has to be a reason why something is suspected to be true. Things that are likely to be true. 

So, if the kid just randomly proposes a connection between bananas and leukemia, then it isn't worthy of authorship. But if a person with deep insight into the workings of the disease and the properties of bananas proposes it as a topic of study then, yes, they could/should certainly be a co-author of the study even if others do the actual proof of the concept. 

It is the insight into the likely connection that has value. 

Otherwise, you might just be sent off on a random quest without any hope of success. 

However, in mathematics, if an advisor suggests a problem to a student, having the insight that the student hasn't yet developed, it is still pretty rare to demand co-authorship unless there is more of a collaboration in the development. But this is just the custom. Certainly it is worthy of acknowledgement, and maybe even co-authorship. It isn't even necessary in this case that the advisor have an outline of a proof, or even any deep insight into how to develop it. It is just insight into a problem worth pursuing. 

But if it is, in mathematics, not an advisor-student relationship and one proposes an idea to another, I suspect that co-authorship would feel more natural, but probably with an acknowledgement section in the resulting paper that details the contributions. But in this case, also, it is more likely that the work would be developed cooperatively, so the authorship question would be obvious. 

Other fields than mathematics have different views on authorship, of course, but it is, even there, a question of insight. Among an infinite number of roads, someone proposes one as worthy of following. If you follow that you owe them something for putting you on the path. How you acknowledge it is a matter of custom that varies from field to field.