Is punctuation necessary for displayed formulas in academia writing? If a formula appears in the main body of the text, there seems no doubt that punctuation should be given to that formula when necessary. But when a formula appears displayed (i.e. solely taking up a line), there seems no consensus on whether punctuation is needed for it. I wonder if there will be any potential ambiguities if punctuation is (or not) included in this case. 

This is essentially a question about functions of punctuation for displayed formulas. I don't want an answer about rules from certain style guide...
In mathematics there is a near universal consensus that displayed mathematics should not be treated differently from inline mathematics with regards to punctuation. By this I mean that the vast majority of papers on the arXiv follow this convention, most journals will add punctuation according to this principle if it's not already there, and so on.

Thus whenever you're unsure whether or not to include punctuation at the end of a displayed equation, try to replace \[ ... \] with $ ... $ - whatever punctuation mark looks natural when it's inlined should be included also at the end of the displayed equation.

I don't think that texts without punctuation after displayed equations are necessarily ambiguous, but then again, a text without punctuation after inlined equations would probably not be ambiguous either. The main purpose of punctuation is after all not to reduce ambiguity but to increase readability and "flow" of the text.