A retirement account can reduce your tax bill, but the type you decide to use determines when