Utilities such as your electric company and gas company cannot turn off your service because you file for bankruptcy. They can require you to pay a deposit for future services. This is why I encourage clients to stay up-to-date with those services that they know they will continue to use such as gas, electric, water, phone, etc. Because of a recent ruling we can now add internet service to that list.
This doesn't mean that other non-utility services such as cable will be shut off. Businesses want good customers. If you pay your cable bill each month, why would the cable company want to turn off your service? They're losing enough customers to satellite and "cord-cutting." At the end of the day, a business wants a good, paying customer, bankruptcy or not.