According to CNN, the emails were released by Donald Trump Jr. shortly before they were going to be published by the New York Times. From this article, we read:
Trump Jr. tweeted that he was releasing the emails to be "totally transparent," but his release came moments before The New York Times published the content of the emails.
The only options for Donald Trump Jr. would be to deny it or try to accept that the mails were going to be public and working on that assumption.
In the face of the importance of the issues, it is to be expected that these e-mails are going to be included into the ongoing probes1 about Russian meddling in the presidential campaign and Trump's team collusion with Russia, and that would lead to -very likely- Donald Trump Jr. being forced to testify. If Donald Trump Jr. were to testify, his options would be either:
Accept the evidence.
Refuse to answer (use the 5th Ammendment).
Lie under oath and risk perjury charges.
'#1 and #2 lead to admit (explicitly or implicitly) that the e-mails are indeed true.
So, (if we discard #3) claiming that the emails are false it would only lead to Trump Jr. being forced to rectify, only that at a later time (during which the issue would not be forgotten) and with yet more damage to his credibility.
By releasing the e-mail he may (attempt to) claim that he was "not hiding anything" and try to get as much of a positive spin2 from it as possible, under the current circumstances. For example, his release in twitter was accompanied by affirmations that what he did was ok and which (despite no legal expert agreeing with that) are already being repeated by his supporters.
Other possible advantages that I can think of (although I will admit that these are a little twisted; I would be surprised if those were the main reasons but they could have helped in making the decision):
It takes away the spotlight from the New York Times article that would (most probably) be very critical of the situation described in the emails. This allows the emails to be presented to the public through some news organizations that are known to justify everything the Trump government does and dismiss any criticism of it, no matter what.
It "steals" the New York Times part of the publicity/brand recognition it would have got for the publication of the emails.
1If such a story goes as far as to being published, it is reasonable to assume that the journalist has evidence enough to prove that the emails are indeed Donald Trump Jr.'s.
2This is usually called controlling the narrative.