The first answer to this question would be your creditors. That is because your creditors are entitled to finding out and will receive notice from the Bankruptcy court. Your employer can also find out if you have filed a Chapter 13 bankruptcy and your payments are made by payroll deduction. Your ex-spouse will also find out if you are paying them child support/alimony.
But what about other people i.e. your family, friends?
Bankruptcy petitions are public records, which means that anyone could possibly find out about your bankruptcy. Some newspapers publish information about new bankruptcy filings. Bankruptcy court websites may publish court calendar information for upcoming cases. Also, anyone could go to the court to review records for free or even pay to see bankruptcy court records online. Lastly and least likely, someone could find out about your bankruptcy if they actually see you at bankruptcy court.
To sum it all up, someone could potentially find out about your bankruptcy, but they would have to search for it really hard. But the only way someone could be that determined to find out about your bankruptcy would be if they already suspected that you filed for bankruptcy. Find comfort in knowing that the odds of someone accidentally finding out about your bankruptcy is very small.