In a debate about the merits of various moral theories, it is considered a fatal blow to any theory to be able to accuse its defender of asserting that "the ends justify the means." No moral theory in which this is true, allegedly, can ever be worthwhile.
For example, utilitarian theories tend to be consequentialist theories. The right action, according to many forms of utilitarianism, is the action that brings about the best consequences (or ends). The way that those consequences are brought about are said to be justified by the value of those consequences So, "the ends justify the means."
The problem with this form of ethics is that some particularly horrendous means are possible. If the ends justify the means, for example, then we might be able to justify the holocaust, slavery, or the torture of a young child. All that matters is whether the consequences are good.
As an objection to utilitarian theories, this clichéd response actually falls quite flat. Utilitarianism actually denies that the ends justify the means, because the utilitarian counts the act itself - the "means" - as one of the consequences of a moral choice. As a result, in utilitarian moral theory, a particularly bad "means" cannot be justified by a plain and ordinary end. Only an end of exceptional value can justify a particularly bad means.
In fact, "the ends justify the means" is actually an objection that is best applicable to intrinsic value theories - theories that hold that certain states have, for all practical purposes, an infinite value, such that they justify any and all means. It applies to Machiavellian theories that hold that the preservation of the state (or "the prince" in a position of power) is of such paramount importance that all possible means are justified in defending it.
It applies to many religious theories, who hold that promoting their religion is of infinite value and any and every conceivable act that aims at promoting that religion is justifed because of the absolute value of this particular end.
However, the biggest problem with the claim that "your theory is one in which the ends justify the means" as an objection to that theory is that it turns out to be internally inconsistent. The objection ultimately contradicts itself.
Whenever a person identifies a particular means as being bad, saying that no end can justify these particular means, we can apply that objection to the claims of the person making it with a very slight change in perspective.
When a person says, "These particular means are so bad that they cannot be justified by any end," all we need to do is define "the avoidance of using this particular means" as a new end. So, if somebody claims that no particular end can justify torture, we can change this into a question about the value of the end of avoiding torture. What the person making this objection is saying is that this end (avoiding torture) is so good that any and all means for realizing it (allowing whatever suffering the torture could have prevented) is justified.
Any person who claims that the end cannot justify the means invariably ends up contradicting himself. At the same time he says this he says that some other end (avoiding a particular set of acts) is so valuable that it justifies any and all suffering that might go along with realizing that end.
So, this cliche objection is actually a meaningless and self-refuting slogan. It may sound good, and it may be effective in making people think that a meaningful objection has been raised. However, it doesn not contribute anything substantive to any moral debate. It's a piece of rhetoric. Nothing more.