I remember being told this by a Latin teacher, but I have since forgotten the details. Why should I use the accusative case instead of the nominative here?
First, if you say "good fortune", the two words must have same case, number and gender. Therefore bona fortunam is always wrong. (This may have been a typo, but I wanted to make sure.) The question is choosing between nominative (bona fortuna) and accusative (bonam fortunam).
When you wish something, accusative is more common than nominative. Think of them as parts of complete sentences:
- Bonam fortunam (tibi exopto)! — (I wish you) good fortune!
- Bona fortuna (tibi esto)! — (May you have) good fortune!
There are other options for both cases, but these should get the point across. If you use the nominative alone, it sounds more like the observation "the fortune is good" than wishing anyone anything. With accusative the intention is clearer and I find it more suitable anyway.
I suggest you also look at this earlier question about the accusative of exclamation.