If you're saving for retirement, you can do it better under President Reagan's new tax law than you could before. But some savers get substantially better breaks than others.

One favored group is the high-income self-employed (like lawyers and doctors) who have Keogh plans. The new law benefits Keogh holders earning more than $50,000.

This year, you can contribute, and defer taxes on, 15 percent of earnings up to a maximum contribution of $7,500 to a Keogh account. You reach this limit when your income touches $50,000. Next year, your maximum contribution rises to $15,000 -- which means that your Keogh contribution (still 15 percent of earnings) won't be capped until your income reaches $100,000.

If you have a defined-benefit Keogh (which an accountant can help you set up), you will be able to put away more than $15,000 a year, says Peter Elinsky of Peat, Marwick, Mitchell and Co. Contributions to defined-benefit Keoghs vary according to how old you are. These plans do the most for middle-aged people who can afford to save a substantial amount of their pretax income.

The law giveth and the law taketh away. If you manage your own Keogh or other pension-plan investments, you will no longer be able to put the following items into your plan: art, oriental rugs, antiques, metals, gems, stamps, coins, wines and similar "investibles." They can be bought, however, by trustees who manage pension plans, including Keoghs.

* Another favored group is those of you covered by company pension plans. Starting next year, you may start an Individual Retirement Account in addition to the pension plan you already have. This will give you two pools of tax-deferred retirement savings instead of one. Keogh holders also will be able to start an IRA.

You may contribute up to $2,000 of earnings each year, regardless of income. If your spouse does not work, you may put away $2,250. That amount may be added to your general company pension account, if the company allows it, or invested separately in an IRA at a bank, savings and loan or mutual fund.

If you are making voluntary contributions to a company thrift plan, up to $2,000 of your contribution may now be tax-deductible. (But there's no tax deduction for contributions that you are forced to make to a company pension plan to qualify for coverage.)

This new IRA is a special boon to people who work for companies with pension plans but who do not expect to stay long enough to qualify for pension payments. In the past they were not able to start an IRA. Now they can.

People who already have an Individual Retirement Account (or are eligible to start one) are short-changed under the new law.

IRAs began as self-financed retirement plans for people whose employers did not cover them with pensions. You have been able to contribute 15 percent of earnings, up to a maximum contribution of $1,500 a year (or $1,750 if the IRA included a nonworking spouse). The amount you may contribute each year has been raised to $2,000 (or $2,250 in a spousal IRA) as outlined above. But you cannot start an auxiliary IRA on top of the one you have.

In short, you are allowed only one pool of pension savings, and that a small one. This contrasts sharply with the situation of Keogh holders and people covered by company pensions who now are permitted to have two tax-favored retirement plans.

If you are a nonworking spouse, the news is mixed. Under the old law, a worker who contributed to a spousal IRA had to split the contribution 50-50: If $1,750 was deposited, $875 went to the nonworking spouse and the other $875 went to the worker.

Under the new law, the 50-50 is gone. The worker may divide the contribution evenly, if that's what is wanted. Alternatively, the worker may put in as much as $2,000 personally every year and as little as $250 for the spouse. (If you divorce, however, a court might still award you half of the IRA, if that seemed just.)

Starting next year, a divorced nonworking spouse may put up to $1,125 a year into an ex-spousal IRA. But the contribution has to be made out of alimony payments, not from such passive income as interest and dividends. To make this IRA worth anything, the separation agreement will have to provide enough extra alimony to cover the annual contribution. So this little gimmick is mainly for the well-to-do.