I think gems are just credit chits you can just sell off, some NPCs in the game may also request you find some for them.
As for Soul Gems, the bottom line is basically the tougher the enemy, the higher their soul quality will be.
A petty soul gem can only contain a petty soul, a lesser can contain both a lesser or a petty, a common can contain a common, lesser, or petty, etc.