This principle makes use of the fact that there is an equal number of red and black cards in the deck. Thus when two piles are formed, one with x cards and the remainder with 52 - x cards, then the number of red cards in x equals the number of black cards in the remainder plus 26 - x. A special case is that the two piles are equal, with 26 cards each, since in that case 26 - x = 0 and thus the red cards in one half equal the black cards in the other half.
The roots of the trick can be found in an old puzzle involving the literal mixing of wine and water. David Singmaster has traced this puzzle back to Mathematical Recreations And Problems Of Past And Present Times, Third Edition, 1896, p. 25. The first application to magic, involving red and black playing cards, appears to be Stewart James's "Tapping a Brain Wave" and "The Psychic Pickpocket", both devised in 1938, but not published until The James File, 2000, p. 1147-1149.
Oscar Weigle published “The Little Star Prediction” in Genii, Vol. 4 No. 3, Nov. 1939, p. 73. (It is presumably this publication that led Stewart James to avoid publishing his related routines.)
Robert Hummer made use of the principle, in expectedly unusual ways. See "The Magic Separation" and "Face Up Prediction" in Half-a-Dozen Hummers, 1940, p. 1 & 2, and a marketed trick, "Gremlins", 1943.
Another early use is Warren Wiersbe's “The Perfect Card Prediction” from Action With Cards, 1944, p. 16. Later, Arthur Hill published “The Odd Color” in The Pallbearer’s Review, Vol. 6 No. 8, June 1971, p. 424. Here Karl Fulves writes: “The principle is old, but well concealed in this routine.”
The earliest use with unequal packets might be Roy Walton's “Duo Colors” in The Pallbearer’s Review, Vol. 7 No. 9, July 1972, p. 547.
See also Arthur MacTier's Card Concepts, 2000, p. 80, “Full Deck Red/Black Relationship.” No further historical information is included in this chapter, though.