It depends on the laws of the country that the company operates in. As a general rule, public companies need to be audited. In addition, public sector organizations need to be audited. In addition, financial institutions (banks, investment companies need to be audited by external auditors as well. For limited companies, there are thresholds and if a company exceeds these limits, they will need to appoint external auditors. For example, in the UK the following limits exist for a company to have audit exemption:
-Less than 50 employees
-Balance sheet less than 2.8m
-Turnover less than 5.6m
They are required for all companies that are listed. After the SOX act (after the ENROR scandal), the audit requirements became a stricter. I am not talking only about external audit requirements but also for internal audit. The bottom line is that listed companies (in the US) need to have an internal audit function and have their accounts audited by independent auditors.
For companies that are not listed, there are certain thresholds (for example number of employees, total turnover, assets etc.) above which a company needs to appoint external auditors. These threshold change though from time to time.