There appears to be several theories on this one, ranging from the shape of the egg, to white spots on the head, to the length of the feathers.
Here is one article that seems reasonable:
"Hold the chick in the normal head-up position as if it were standing. Extend either wing-tip and look at the feathers on the surface. Look closest to the edge of the wing and you will see that there are two distinctly different kinds of feathers. One set is more feather-shaped and the other is fluffy, downy feathers. The first is called the "primaries" and the others are the "coverts." If the coverts are shorter, you have a little pullet - a baby hen. If they are the same length, or the coverts are longer, reach for a cigar because it's a baby boy. Granted, you have to look closely, and remember that the primaries are closest to the wing edge and the coverts are higher up. "