Which of these two is written correctly:
- MRI (Magnetic Resonance Imaging)
- MRI (magnetic resonance imaging)
This is a matter of style. If there's a style guide required or recommended by wherever you're writing for, follow it. Otherwise, while bearing in mind the need to be consistent within your document, you should do whatever is clearest. It doesn't matter if you only have simple initialisms as in your example, but some form of highlight of the letters that count can be helpful in more convoluted abbreviations. Capitals are a good way to do this. Bold face is often discouraged in body text, and it's certainly not necessary to do both.
TLDR: You should not use capitals unless they were proper nouns to begin with.
Although it has not always been this way, we do not in modern times use a capital letter for a common word simply to draw attention to that word. Capital Letters are a Poor Way to do anything but hearken back to Times Immemorial when we thought that Important Things should be written bigger than little things. This is considered at best archaic and at worst pushy and in bad taste.
The only time that one capitalizes the words in an expansion of an acronym is when this acronym is an abbreviation for a proper noun normally written with capitals.
Although many authors of expository writing show a predisposition to capitalizing the initials of the expansion for pedagogical emphasis (trying to thrust the reader's attention toward where the letters are coming from), this sometimes conflicts with the convention of English orthography, which reserves capitals in the middle of sentences for proper nouns.
Enforcing the general convention, most professional editors case-fold such expansions to their standard orthography when editing manuscripts for publication. The justification is that (1) readers are smart enough to figure out where the letters came from, even without their being capitalized for emphasis, and that (2) common nouns do not take capital initials in standard English orthography. Such house styles also usually disfavor bold or italic font for the initial letters.
For example, "the onset of Congestive Heart Failure (CHF)" or "the onset of congestive heart failure (CHF)" if found in an unpublished manuscript would be rewritten as "the onset of congestive heart failure (CHF)" in the final published article when following the AMA Manual of Style.
In short, even though budding writers may be wont to try to make various common bits look important through bombastic emphatic devices, copyeditors routinely normalize such gaudy displays of typographic taste-failure back to simpler, less aggressive styling. 😉