The output is the kMDItemUserTags array with a list of objects in the array:
kMDItemUserTags = (
The above output is much more easily parsed and managed; however, the objects need to have been indexed by Spotlight. You can also use mdfind to look at user tags with kMDItemUserTags to see a list of tagged content. Or, you can constrain the output using == and a quoted parameter:
mdfind "kMDItemUserTags == Red"
The output is a list of all files with that tag. Finally, you can