A not-untypical style (as used by the BBC) is to write initialisms like UUID in all caps, and acronyms like Nasa in title case.
Initialisms are pronounced by saying each letter in order. Acronyms are pronounced as if they were words.
"ID" is a funny case because it's an ordinary abbreviation, and not really an initialism* or acronym, but it's pronounced just like an initialism. I think I'd prefer it "ID".
I would definitely avoid writing it "Id", lest it be confused with Freud's concept.
* unless as Norm Macdonald joked, the "D" is short for "dentification"