A letter explaining bad credit should be honest and transparent. Acknowledge your financial situation, and explain any extenuating circumstances that may have contributed to it. Honesty is critical since any lies or omissions will inevitably come to light and could jeopardize your job prospects.
To quit, write a simple letter addressed to your supervisor that says nothing more than you are resigning, and which day will be your last. Don't mention your reasons or future plans, no complaints, just your resignation and effective date.
Provide a clear and concise explanation of the circumstances that led to your bad credit. For example, did you lose your job or experience a significant medical expense? Providing this context can help the employer understand why your credit history looks the way it does.