Here is a Pictorial guide (with screenshots) on the fastest way to make the most money in Plants VS Zombies (iPad, but may work with other versions).
As you can see it's all about making a level in which you can survive the zombie onslaught using the cheapest defences possible. It's important that your defences not only kill the zombies, but also survive (so you don't have to spend sun to replace them). The less sun you spend the more money making flowers you can build.
Just choose the "last stand" level and setup your plants as shown. The gold magnet will automatically harvest the money, that way you don't have to pay much attention to the game. It won't get all of the coins, so I you will have to tap anyway. Note: Keep a watchful eye on the onions, they will need to be replaced WHEN they get eaten.
While you are trying to make money, make sure you build up a good zen garden and try and buy a snail and some chocolate as soon as possible. Give the snail chocolate before you play a few levels of last stand to make money and when you go back to the zen garden your little snail will have collected lots of cash.
Oh, one last thing. Buying bacon in crazy caves shop doesn't do a thing, no matter how much you buy, it's just there to waste your money.
Have fun making money on Plants vs Zombies last stand mini game!
1st Screen on "Last stand" on Plants vs Zombies. Make money fast by maximising defines with minimal cost. Then you can build more money making plants.
After 4 flags completed, the only money that was spent was to repave the onions and build more money making flowers.