Typically, an acceptance test is written against a requirement. Regardless of how you capture requirements, you should have a set of things that your system must be able to do, expressed as a list in an Software Requirements Specification (SRS) or as a collection of user stories, among other options. Each requirement should have an acceptance test associated with it that is run against the system that builds and runs.
Acceptance tests come after unit testing (which typically tests at the function, method, and class level), integration testing (class and package level), and system testing (post-integration to ensure that the system functions as designed). After system testing, the developing organization knows that the software works as they intended it. Acceptance testing ensures that the needs of the client/user are fulfilled as specified by the known requirements.