Generally speaking, student loan debts are not discharged in bankruptcy, unless the debtor (the one filing bankruptcy) can show "undue hardship." While some bankruptcy courts differ, most hold that a debtor must prove 3 elements to establish undue hardship:
1. That the debtor, if forced to repay the student loans, could not afford even a minimum standard of living;
2. That this situation is going to continue for most or all of the repayment period; and
3. That the debtor has made good faith efforts to repay the student loans.
While these elements don't necessarily sound difficult to prove, in practice they are. Particularly #2, that things won't change for the debtor during the entire repayment period. If a debtor is elderly or ill, that may be easier to prove, but for a relatively young person, it's hard to say that they won't be able to repay the loan, given the usually long-term nature of student loans.
Moreover, the Dept of Education or their servicers will argue to the Bankruptcy Court that there are now many repayment options for student loan borrowers, particularly the ones based on a borrower's income. In some of these plans, such as "income-based repayment," a borrower's repayment obligation can be as little as 0 per month.
Their payment can change based on their income in an income-based repayment plan, but after 25 years, any remaining balance is forgiven. But options such as these are only available for federal loans, which are the vast majority of student loans.
For those with private loans, there are fewer options. If you cannot afford the regular payments, and cannot reach a negotiated settlement with the creditor or a reasonable payment plan, then you just have to wait and see what happens.
They may sue the borrower, but private student loan lenders are subject to the state statute of limitations, so they must sue within a certain period of time or become time-barred and unable to collect. Also, private lenders cannot administratively garnish your wages or offset tax refunds, as is possible with federal loans.
If they do sue, by all means hire an attorney experienced in this area, because private loan lenders cannot always prove their case. Even if they can, it may be possible to reach an agreement to settle the loan for something that you can afford.
Some of my clients choose to file chapter 13 bankruptcy to deal with student loan debt, which at least keeps the student loan creditors, both federal and private, from taking any collection actions against the borrowers, as long as the chapter 13 case is going on, which can be from 3 to 5 years. There is also a "co-debtor" stay in chapter 13 which protects cosigners from collections and lawsuits during the case in most circumstances.
If you have serious student loan debt problems, and especially if you are considering filing bankruptcy to help you deal with your student loan debt problems, consider hiring an experienced debt collection defense/bankruptcy lawyer to assist you.