They're basically the same. 'When I do it' might indicate a single, isolated incident (when I sneeze). 'When I'm doing it' probably indicates a continuous action (when I'm dancing).
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.