I figured this would be a much more common question here, but I couldn't really find anything. By this, I don't mean religions which arose from other religions such as Christianity - rather, how did people come to believe in Odin, Mars, Ares, Shiva, Baal, and Yahweh? Could these have been tales of real people that came to be exaggerated over time? Were they initially conceived as stories which eventually came to be taken literally? Some of the complex relationships between Gods and religious characters seem unusually complex, and I could imagine that being the result of either cultural diffusion or actual stories being corrupted.
Which theories are generally accepted among historians, and which seem most reasonable to you?
Your question on the idea that some ancient person was the inspiration for a god or mythic hero crops up on the sub frequently. It is an old idea that Euhemerus proposed in the third century BCE. That idea is generally discarded, but in fact, we can't really say when and how the populating of the universe with powerful spiritual/supernatural entities occurred. It is clearly early, and most importantly for the purposes of this sub and of understanding the phenomenon in general, it is prehistoric. We can only rely on conjecture. But relying on Euhemerism is not the normal route among current academics.
I don't think history can give a definite answer on this, Since religious mythology existed long before the historical tradition came in to being. However we might find an answer in a maybe unlikely place; Neuroscience. This video offers a nice perspective on how we came to believe in god.
we hypothesized that as the human being developed the ability to forecast their own self dissolution, (their own death), which was tremendously anxiety generating, another concept emerged, which allowed that anxiety to be reduced. And whatever the concept was it has certain parameters, it had to be infinite and forever and everywhere, otherwise it would have an end. If you would have an end, then you'd have anxiety. So there had to be a concept ?? within the brain itself, that there is something out there that goes on forever, and if you somehow relate to it and can be a part of it, the idea of anxiety becomes a non-event. (2:01-2:40)