It is required by the Sixth Amendment of the U.S. Constitution that if you are facing criminal charges, the court must appoint you a lawyer if you cannot afford one. However, this does not usually apply in the divorce context.