The script is always on?
Are you using any money scripts or anything?

The AI has odd priorities. They will often waste all of their money on units and not have anything left over for buildings. Once they start doing well, they spend more money on buildings.