This is all dependent on your climate. In cold climates, you do not want water vapor to be trapped in a cold area since it will condense out. Around us in our cold WI climate, a few homes were built that had plastic under the siding - this was such a disaster that these homes had to be torn down. So in a cold climate, the moisture barrier goes just under the interior drywall. This keeps the water vapor out of the cold region, so it stays vapor rather than water.
The styrofoam, if sealed well on the edges, is a vapor barrier and it would prevent moisture from being trapped. If, however, the cracks are not sealed, moisture would get through and then condense on the old sheetrock underneath - this could be the cause of the mold you see. Not good - you may want to clean up or remove that drywall and reinstall or replace the styrofoam. Then put a vapor barrier over the styrofoam and seal up the edges of the styrofoam. I am assuming you live in cold climate.