The attorney-client privilege law protects you. For example, if you have committed a crime in the past and you tell your lawyer about it, your lawyer cannot be forced to testify against you in court. This is due to attorney-client privilege. Your lawyer will be forced to do so if you confess to him.
They cannot present arguments that they know are not true. If you go to trial and your lawyer knows you did it (either because of the evidence or because of the confession you made to them), he won't be able to argue that you didn't. They may argue that the evidence is insufficient, that you cannot or should not be convicted based on the facts in question, and it is possible that they are right and that the conviction will be effective. Usually, if they think it would be useful for their defense to know, they will tell you that they want to know.
That's why some criminal defense attorneys will tell you right off the bat not to confess to them. What this means is that, if you confess, your lawyer is now prohibited from presenting a large number of defenses that may have worked.