なさい gives a direct instruction from someone in authority or a caregiving role. It is softer than a bare imperative, but it is not a generally polite way to ask an equal or superior to do something.
Who normally uses it
The key issue is the relationship between speaker and listener. A parent may use it with a child, and a teacher may use it with students. In test directions, the authority comes from the instructions themselves rather than from a person speaking face to face.
A bare imperative such as 読め is usually more abrupt and forceful than 読みなさい. By contrast, 読んでください is a request and is safer across ordinary polite relationships. Think of the three as blunt command, softened authoritative command, and polite request—not simply as three levels of politeness.