This interesting addition to men's pants first appeared in the early 1500's as a reaction to shortening hemlines of the tunics men wore. As the tunic became the doublet, male genitalia became exposed to the light of day (and to everyone looking). Though tights were worn as precursors to pants, the joining of the crotch seam had not yet been established, so the tights left a hole in the genital area. In order to relieve public outcry against such "sights" a triangular piece of cloth was added to close the void.
Originally, the codpiece was a flat piece of cloth that was sown onto the tights at all three corners or at the bottom corner with the two top corners tied up. The tied version allowed for easy access I guess. One problem existed with the flat cloth though: Men who could (proudly) display their "manhood" found that the new addition detracted from the overall aesthetic of their dress. Steps were taken to rectify this loss of "decoration" from the clothing.
As the tights became breeches, the codpiece remained. However, the design of the codpiece changed with the design change of pants. The codpiece became more pronounced and curved, becoming more of a small sack in which the genitals could fit. The codpiece, as it became more pronounced, could then be decorated with stylish trinkets or even (shocker) more size. The size of a man's fortitude could be enhanced regardless of the size of his…fortitude.
Most of this material is a summary of the one serious site Tara has listed on her links page. (http://www.renaissancedancewear.com/codpieces.html) The only other sites I could find were the humorous sites she lists http://www.dogpile.com will turn these up if your interested.
...It was just to funny to pass up. I mean...I don't talk about it and I'd NEVER decorate it.