It's difficult for me. Here's now I rank the individual films:
SM2>SM1>IM1>IM3>IM2>SM3
I'll say that for consistency's sake, the Iron Man trilogy is better. I've really enjoyed all 3 of those movies (yes, even Iron Man 2). All 3 are really fun movies with a rockstar performance from RDJ. Iron Man 2 & 3 don't quite match the quality of the first movie, but I still think they're good movies.
Spider-Man's trilogy started off really strong, but the final act was disappointing (and it's the worst movie of the 6 we're all talking about, here). I can't deny that the first two films in this trilogy are my favorite comic book movies ever, though. And Spider-Man 2 is very much in my top 5 favorite movies of all time, period.
Gaaaah, this is so difficult! After seeing Iron Man 3 back in May, I would have said Iron Man had the best trilogy (because of the consistency in quality), but the more I think about it, the more I'm saying that Spidey wins? Because he has 2 great movies, and Iron Man has 1 great movie?