ex: Tanaka-san ga kitte o kaimashita (Tanaka-san bought stamps.)
ex: Tanaka-san wa kitte o kaimashita (As for Tanaka-san, she bought stamps.)
That will depend what the question is or what you want to emphasize on.
First sentence's question would probably be:
dare ga kitte o kaimashitaka ?
Emphasis is on dare. ga usually emphasize what's before it.
Second sentence's question would probably be:
Tanaka san wa nani wo kaimashita ka?
wa gives listener to look forward to the detail of what comes after wa. wa is like "as for"
:
T: Yuubinkyoku e ikimashita. (I went to the post office.)
Q: Nani o kaimashita ka. (What did you buy?)
T: Kitte o kaimashita. (I bought stamps.)
Q: Hagaki mo kaimashita ka. (As for postcards, did you buy them too?) *They put emphasis on mo, as they're making the hagaki the topic by using mo.
T: Iie, hagaki wa kaimasen deshita. (No, postcards I didn't buy.) *Emphasis on the use of wa.
As mo means "also" I think this is more suitable than anything else.
If there are more questions after this like
Q: hako mo kaimashita ka?
T: iie, hako mo kaimasen deshita.
mo is used rather than wa because previous sentence is also "did not buy" and thus no need wa to contrast the answer. It would now mean "I also did not buy a box"
as for last answer, wa is used because it's contrasting the first question.
T: I went to post office
Q: What did you buy
T: I bought some stamps
Q Did you also bought postcard
T: Well, as for postcards, I didn't buy them
So, when you mean to say the last statement above, "iie, hagaki wa kaimasen deshita" becomes the more proper word, don't you think so?
I've not seen "o" used on negative question. I could not explain it either except to say that it sounds weird. If you what to say, "iie, hagaki ga kaimasen deshita", then the question would be "nani ga kaimasen deshita ka". Emphasis is "what is it that you didn't buy?"
so in brief, wa is use for 2 purposes...
1) To throw the emphasis to what comes after wa
2) To contrast thing. it could be either on the same sentence itself or immediately before this sentence.