If you play through a quality DJ box upstream of your stomp boxes, you can actually do both, recording clean and post effects. Something I sometimes do with live recording. >
"Both" is surely the best answer. Otherwise, it all depends what the guitar's actually doing. If it's a solo, or anything which really needs a human feel, the guitarist will benefit from the presence of the amp during recording. If it's just simple stabs, or power chords for texture, it often pays to record it clean, maybe pitch-correct and quantize some of the humanity out of it, and choose FX afterwards.
I will forever capture guitars with a Y cable, split the signal to the amp and to a DI. That way if we decide the recorded amp w/ effects wasn't such a good idea, we can always re-amp with new effects or add the effects in the DAW at a later date and the performance is saved. I don't want to take away a guitarists effects as it changes the way we play pretty drastically. Having delay on is the best example. If a guitarist wants to dirty up a section, they will likely add more chunk hits and ghost notes with the delay on than they would with it off. Totally different feel.