I believe the using dividends for tax avoidance is either no longer effective or has been cracked down upon.
You can also give less to the government on your VAT if your profit (or revenues, I can't remember which!) is below 150,000 GBP. Rates vary between 9% and 15%.
So it's still worth it, but not quite as much as it used to be before IR35.
For consultants/freelancers/contractors - dividends can be fine, if you can mitigate your exposure to IR35 (typically a bigger issue for contractors). Groups such as the PCG can really help here, but really the key thing is ensuring that any contract can't be thought of as disguised employment (control, substitutability and mutuality of obligation being the keywords) - speak to a Lawyer or a specialist accountant for advice or other clued up contractors for advice.
The tax position on dividends is also a bit more subtle than above; if your total personal income is less than the £32k (minus allowances), then you're going to get the dividend tax credit back so the div is tax free. Granted the company is paying corp tax at 20% on all profits; but also it gives you options to defer company income becoming personal income, building up the company's reserves. As I understand it, you can wind up the company and get entrepreneurs relief which is also a worthwhile target for consultancies.
Small payroll income so that you fall within a low income tax bracket. Top up salary with dividends as they have a much lower rate of tax. If you have a live at home wife, make sure she's employed by the company in some form, eg. you can pay her the minimum wage for secretarial duties. Ideally falling within the tax-free lower bracket. Unlike regular employment, you can start claiming a lot of everyday things such as food/transport/home office electricity/internet/etc. as business expenses, thus meaning you can claim 20% VAT (sales taxes) back depending.
Ultimately, there's also the final payout if you manage to sell the company. If it were classed as regular bonus income, you'd be taxed at 45%. Instead you get charged as capital gains at 18-28%. You can also get entrepeneur relief on the first £10m which means you only get charged 10% instead of 28%.
NOTE: Some of these are loopholes like dividends and employing family. They tend to get cracked down on every now and again (I'm not even sure if they're valid now)
But when you get down to it, there are a heck of a lot of potential savings over standard income tax (currently 40% on anything over £32k, 45% over £150k)