The most coherent explanation I’ve found for understanding the difference between the “wa” and “ga” particles in Japanese comes from Jay Rubin’s book Making Sense of Japanese (originally titled “Gone Fishin’”). Namely, use “ga” when you want to emphasize the previous word, and “wa” when you want to emphasize the following words. Which to use depends on what kind of question you’re asking or answering.
For example, he gives the following answers:
And these matching questions:
And that’s why 「私はケーキです。」 does not mean “I am the cake”, no matter what BabelFish says. Except when it does, of course, but for that, you’ll have to read the rest of the book.