For me, it's never. Caffeine seems to trigger migraines for me, and coffee makes everything move right through me. The closest I can get is caffeine-free herbal tea - I usually go for chamomile, ginger, or mint teas. They're yummy and warm and don't cause migraines. Sometimes the warmth makes things move through me a little quicker, but mostly it's comforting to my tummy and seems to do me some good.
Oh, and here's a tidbit I learned while I'm thinking of it - so-called "decaf" coffee or teas really aren't caffeine-free. They have less caffeine than their regular full-caffeine counterparts, but they do have some caffeine. I learned that the hard way! So I cannot drink "decaf" green tea or anything along those lines either. If something says "caffeine-free" then it means it, absolutely no caffeine, but "decaf" just means "less caffeine".