A product specification (often abbreviated as spec) is a document or set of documents describing what a product is, what it is supposed to do and what it is not supposed to do. It’s a key documentation and must exist for any product, even the smallest one. Working without such a documentation would be like working in the dark, and it would be impossible to define good development and testing practices.
The spec has solid parameters needed to determine software’s quality. Without it we are not able to state whether the software has or has not bugs and whether it meets the customer needs. Also, errors in the spec may lead to terrible consequences because they may be carried out to development phases, which would be extremely costly to be fixed.
Nevertheless, that doesn’t mean we need a large or complex spec. Its complexity and type of documents varies according to the complexity of the product itself and the software development model in use. On more traditional models like Waterfall, it tends to be more detailed, composed by text documents and/or UML diagrams (e.g. requirement and use case diagrams), among other things. On modern Agile models like Scrum, it tends to be more succinct, and may be composed by a Product Backlog and User Stories.
Patton, Ron. Software Testing. 2nd ed. Sams, 2005.