Solution 1:

Soul Gems where originally created by Molag Bal (Full text). Whether he discovered how to shape the crystal or created it is not clear.

Beside that, it seems that the consensus is that they are mined from the ground around Blackreach and Solstheim, where magical ores (Aethernium, Ebony and Heart stone) are found. Maybe they are also found in other parts of the world and imported in Skyrim. Keep in mind that Nirn is built from the bodies of gods, so unusual crystal formations and extensive caverns can be expected.

Solution 2:

Well, I can answer part of your question. Pretty much, soul gems are crystallized formations of energy, they form in oblivion, they then bleed through into the physical world, through weaker spots in reality, the weakest places are in blackreach. I do not, however know how the shopkeepers are somehow able to have access to them so readily. This probably didn't help, but I hope it did.