My understanding is that "divine" simply means channeling an external power. You're absolutely right, no gods need be involved (I'm defaulting to 3.5e as usual):
If a cleric is not devoted to a particular deity, he still selects two domains to represent his spiritual inclinations and abilities. The restriction on alignment domains still applies.
A Chaotic Good cleric can choose to worship, say, travel and good. Devotion and insight (WIS) somehow lets them channel the power of these raw concepts into spells. I imagine it's like an 80's cartoon hero learning the true meaning of friendship, and believing in it so strongly that the evil villain's fireball/hypnosis/whatever just fails.
Many cleric domains have actual planes, so the power probably comes from there.
http://www.d20srd.org/srd/spellLists/clericDomains.htmThe Good domain is all about protection and smiting evil, which makes sense if it's channeled from the good-aligned afterlives.
The Healing domain spells are entirely Conjuration(Healing), even regeneration, conjuring/channeling the Positive Energy Plane. Reminder that Healing is *not* Good- The Positive Energy Plane is even more lethal than the negative. It heals you, then keeps going, quickly giving you (to quote Wikipedia) "explosive cancer of the everything". Also all your equipment explodes due to being unliving? Remember kids: Heal responsibly.
Domains like travel and war are weirder since they don't really have planes. I guess they're just strong enough themes in the fabric of existence to resonate and react to worship.
Druids specifically channel nature, which is why they must be at least partially neutral. Nature is neutral, even the direst wolf is Always Neutral. It's not malicious, the pack needs to eat.
Personally I like the idea that druids may be especially antagonistic towards forces from alignment planes. I think that's just headcanon though. They're clearly cool with the *elemental* planes, which many of their spells conjure from. Also they can literally turn into elementals.
The Paladin page of the SRD doesn't even mention "god", "deity", or "worship". So they're presumably just as free to worship Lawful-Goodness. I'm not sure if their power comes from Celestia, or perhaps just the (incredibly inaccurate) depiction of chivalry they follow. The idea of helping the weak and fighting with honor is a resonant one.
Ranger magic sucks and they ought to be purely extraordinary instead of supernatural, but I guess they channel nature too. And sometimes speceism.
Oh, about deities though. Clearly you *can* channel divine magic through a deity. If they get displeased, they can cut you off. Pure-RAW this is mostly a disadvantage, but there are notable benefits to being part of an established religion. Some spells involve speaking to your deity to get advice, for example, and you may get support from fellow worshipers.
On the other hand, neutral atheist clerics can cast literally any divine spell. Having any alignment bars you from the opposite alignment spells. You also get to choose whether to spontaneously conjure positive energy or negative energy (though the choice is permanent. And channeling negative energy usually sucks.)
Evil clerics can still prepare healing spells, of course, because again... healing spells lack the Good descriptor, and negative energy spells are no more Evil than a broadsword.
I would have talked about arcane magic but I'm not sure what it is, really. Charisma-based arcane magic seems to be channeling dragon/fey blood, or simply pure universe-rending smugness. I suppose Intelligence casting is taking advantage of glitches and obscure (literally arcane) quirks of reality to MacGuyver fireballs out of batshit.