@FumbleFingers - Let me agree that "ID" is short form of "Identity Document". But, we find a commonplace thing, such as, "What is your email ID" or "What is your email id". Obviously, the speaker is asking for "email Identity" or "email Identifier" and not for "email Identity Document" or email Identity Card".
The other variants ("Id" and "id") wouldn't usually be used in normal writing contexts, but are quite common in some computing contexts. For example, a common convention for naming functions/methods is to capitalise the first letter of "words" and treat abbreviations as normal "words".
It's actually about whether Id is short for "Identity" or "Identity Document", and therefore it's really about English. But it probably doesn't matter either way in code, since most camel-cased languages idiomatically only capitalise the first letter of acronyms.