Overall, I'd have to say Firefight edges it for me, although it's very close.
Spartan Ops tends to be a lot more varied than Firefight: I particularly enjoyed the missions set during the invasion of the Infinity in Week 7, as the setting and objectives felt quite different and fresh compared to the rest of the Halo co-op experience. I also liked the way that some missions focused very heavily on the use of vehicles and heavy weapons, rather than just sticking those found in loadouts with the occasional power weapon dropped in every 5-10 minutes. The weapons made a really big difference there, as I find Halo 4's arsenal to be significantly more satisfying to use than the one found in Reach.
The downside is, of course, that once you've played a mission, that's the extent of its replay value: if you start it up again you can choose a different loadout, but that's basically it. You can't alter player settings or even set non-standard weapon and equipment loadouts, activate regular or custom skulls, customise enemy types and traits, switch hazards on and off, adjust the objectives or play as part of the opposing team - all of which can be done in Firefight, providing a potentially massive increase in replay value. You want to have 10% HP, take 300% damage from all sources and fight nothing but Hunters without any respawns and while defending a generator? You clearly need professional help, but while you're waiting for your straightjacket Firefight will keep you occupied. With Spartan Ops, Mission X will always be Mission X - and if 343i have set skulls up in a way that you don't like, there's nothing you can do about it. While Firefight's maps can be very repetitive, at least you can customise them in almost any way you want. It's also nice to know that you can actually lose a game of Firefight, rather than just respawning infinitely until the level is over: use of checkpoints or a life pool would have definitely enhanced things, as being the last player alive in Firefight added a tension that just isn't present in Spartan Ops.
For me at least, another issue is that I don't particularly enjoy fighting against the Prometheans, as their low number of unit types and, frankly, cheap tactics and abilities makes me dread any mission that contains them, especially on the higher difficulties where I tend to play. This is a problem specific to Halo 4 and of course there are players out there who no doubt prefer fighting them over the Covenant, so it's a highly subjective complaint, but it's enough of an issue for me to warrant a mention.
The very last thing is perhaps my biggest issue of all: Xbox LIVE. For very long periods of my Xbox career I've found myself unable to access the internet, and Firefight provided many hours of entertainment during the periods where I couldn't jump into matchmaking - precisely the time where I'd particularly want something to be able to do that didn't involve other players. An online requirement for Spartan Ops means that there have been times where I've been forced to ditch Halo 4 altogether in favour of other games, and for players who don't have access to XBL it must be particularly galling to know that part of their game's price specifically includes access to a game mode that can quite easily be played solo (and indeed, is often more fun as a solo experience) but which they can't access arbitrarily. As a long-time offline gamer, this alone is enough to push me in Firefight's favour.
So overall: Spartan Ops is very good, and I've had a lot of fun with it, but as a concept Firefight just wins out!