Cooking a chicken until its "juices run clear when pricked" is pretty standard poultry advice. However, according to Cook's Illustrated, it's not a very dependable way to tell if your chicken is properly cooked.
Though myoglobin (the molecule that gives meat its pink or red hue) does lose its colour when heated, the temperature at which the colour change occurs can vary depending on a whole bunch of factors. In fact, when Cook's Illustrated tested this theory, they found the colour of the juice had very little to do with the temperature of the meat:
When we cooked whole chickens, in one case the juices ran clear when the breast registered 145 degrees [62 degrees Celsius] and the thigh 155 degrees [68 degrees Celsius] - long before the chicken was done. And when we pierced another chicken that we'd overcooked (the breast registered 170 degrees and the thigh 180 degrees), it still oozed pink juices.
The takeaway? Get a thermometer, use it, and never under-cook or overcook your chicken again.
Cook Until the Juices Run Clear — Fact or Fiction? [Cook's Illustrated]