Users are already given a unique ID when they register. This just a part of base Joomla. You can display it on profile with [user_id] in a Custom HTML field. You can use CB Code Field and some custom PHP to output that as an image if you want I suppose, but you'll have to code that. Your alternative is to use a Joomla content plugin to generate an image or PDF file to output whatever information you want as the Custom HTML field supports Joomla content plugins.