Even up to the tax filing deadline for the prior year, it is still possible to make contributions to individual retirement arrangement (IRAs) and health savings accounts (HSAs) for that year. For 2017, this means you have until April 17, 2018 to contribute.
On the other hand, 401(k) and 403(b) accounts must be made through employer payroll deductions, so you cannot go back and contribute for the prior year to receive the tax advantages. You can go through your employer’s HR or payroll department to start making contributions on your next paycheck, however.
If you have received a windfall (e.g., a tax refund!) or just learned about retirement accounts, you can make retirement contributions for the prior year in January–April of the next year. Typically, you would want to max our your IRA first and then your HSA.