The Los Angeles Dodgers home uniform with the script Dodgers in blue and the red number on the front is often simply accepted as one of those idiosyncratic elements that just is. Before game four of the NLCS, Todd Radom on his uniform design blog shed some light on the story with an article in the Sporting News from 1952.
The article, which was published after the uniforms debuted on opening day, claims the uniforms were designed for the 1951 World Series that wasn't thanks to Bobby Thompson's shot heard round the world. The claim is that the innovation came about as an innovation for television audiences, for identifying the batter when watching from a fixed camera position.
The first World Series broadcast on television was the 1947 series between the New York Yankees and Brooklyn Dodgers. It was broadcast by WNBC in New York and was sponsored by Gillette and Ford. The small television sets of time time allowed an audience of millions to see the events in real time.
The Dodgers had a history with television, involved in the first ever broadcast of a major league baseball game in 1939. The experimental station that would become WNBC broadcast a Dodger game against the Reds, with one camera on Red Barber and another behind the plate.
In the above highlights from the 1947 World Series, you can see that the camera has moved to behind first base. The close up shots of pitchers and batters were likely done pre-game for the newsreel footage, which is how the rest of the country would get to see the games. The first base camera can't show player numbers for right handed batters.
TV technology continued to improve rapidly, and in 1951 (still pre-red numbers) the Dodgers participated in the first color broadcast of an MLB game. The World Series in 1955, the first World Series victory for the Dodgers, was the first televised in color. However, most people (and thus the surviving footage) watched the game in black and white.
Now looking at the highlights from the 1955 World Series we can see the new red numbers in action. The camera has returned behind home plate, which makes the front numbers most important for identifying pitchers. This footage also debunks the "red would look better in black and white" theory. In black and white the difference between the two colors is negligible. Where red would stand out is the new medium of color television, or in person at Ebbets Field.
Uni Watch also chimed in on the red numbers, speaking to the Dodgers graphic design director Ross Yoshida. Yoshida throws out a few more theories. The first is that O'Malley got the idea from football. TV numbers in football are essential to a broadcast, since unlike baseball the announcer in the press box can't rely on players staying in the same place and can't always see the front and back numbers.
However, if O'Malley got the idea from watching football he must have been able to see into the future. Here's video of the Giants and Rams from 1950, and TV numbers are nowhere to be seen (also the NY Giants uniforms are red in that footage. Can you tell?).
Even the famous numbers on the side of the Alabama helmets weren't added until 1957.
The truest answer is probably the simplest. The Dodger logo already contained some red, and having such a long history with the fledgling broadcasters in New York, O'Malley knew that color TV was the future. The contrasting color would get the fans and press at Ebbets Field talking about the change, and would truly stand out once color TV became widely accepted.