In prose and titles, should an author use 3-D and 2-D or spell out the abbreviations?

It depends. MLA style minimizes the use of abbreviations in prose, but if in certain contexts the abbreviation is more common than the spelled out term, use the abbreviation. For example, you might refer to 3-D movie rather than three-dimensional movie, but you might write a two-dimensional surface rather than a 2-D surface. 

If you are citing the title of a published work that includes the abbreviations, use the abbreviations. If you are supplying the title of your own work, be consistent: use whichever form—abbreviation or spelled-out term—that you have used in your paper.