It's one of gaming's most argued-over questions, so here's the case for each side.
Halo 3 may have had the bigger initial following, but CoD4 has stayed busier since. Its strengths are polish across the board: every gun has a proper aim-down-sights function, the graphics are more photo-realistic, and the weapon variety comfortably outnumbers Halo's.
CoD4's weak spot is vehicles, which Halo 3 has in abundance. Plenty of players also argue Halo rewards actual skill, is more fun, and is much easier to level up in, while CoD4 gets over-crowded with boosting.
Personally I'd take CoD4 — but it really is your call.