Men have nipples because, as an embryo, everyone is a female until the Y chromosome kicks in.
After conception, the human embryo develops as a female. Only after 6-8 weeks does the Y chromosome kick in and the fetus begins developing male characteristics. By this point breast tissue, milk ducts and nipples have already formed. This happens in all mammals, the only exception being stallions, who do not posses nipples.
Generally evolution will only weed out a characteristic if it proves harmful to the creature, and of course, although having nipples provides no benefit to a man it has no ill effect either. Darwin (and others) wondered if at some point in the very distant past the males of a species from which we are descended suckled their young.