machen is 'make' and tun 'do' so my idea would be thinking about when you use which in English.
e.g. : To make a cake, einen Kuchen machen
To do the dishes, den Abwasch tun
Well, now that I think about it, there might be a better rule. I think 'machen' could be used whenever you create something, or take influence upon something, while 'tun' refers to something where you rather just participate in something. And also, to me it seems like 'machen' can be used a lot in cases you would normally put 'tun'.
I cringe at "den Abwasch tun"... I would definitely use "machen" in that case.
Originally (as is still easily visible in the words, etymologically) "machen" equalled "to make" (creating smth.) and "tun" equalled "to do" (being active, without a fixed result/end). However, "machen" can nowadays, especially colloquially, be used pretty much always where you would think of using "tun". You're probably on the safe side using "machen" more or less exclusively, while it will
always be wrong using "tun" where you'd say "to make" in English.
Actually, using "tun" often may give you a mildly bad reputation with some people, as "tun" is overused by speakers with little knowledge of grammar, as an auxiliary instead of regular conjugation: e.g.
"er tut sagen" (please don't ever use sentences like that!! while you do hear this stuff said, e.g. in TV talkshows, it is considered
awfully bad German by just about every even semi-educated speaker) instead of the correct "er sagt". Many "education snobs" avoid "tun" whenever possible because of this association with bad grammar.
The only case I can think of atm where I see a
clear difference in meaning between "Tun" and "machen" is the questions "Was hast du getan?" vs. "Was hast du gemacht?"
"Was hast du getan?" has a strong undertone of importance, drama and severity (that's what you'd be saying, e.g., when you discover someone has committed a crime, corresponding to English "What have you done?") while "Was hast du gemacht?" is much more neutral, corresponding to "What have you been doing?"