It's not necessarily a bad thing to use in writing - but I would need more context to fully understand what you're trying to express. You could replace it with "what one should and should not do" or by saying "the rules and customs" of xyz place / situation, etc.
Formal alternative for "dos and don'ts"?
2 Answers By Expert Tutors

Alicia H. answered 03/26/19
Ph.D Candidate in Special Education specializing in academic writing
Hello, generally trite expressions are frowned upon in professional writing, but "pros and cons" may be acceptable dependent on the subject context. Perhaps "acceptable and unacceptable" or "desirable and undesirable." Hope this helps. If you let me know the context I can better assist!
- Alicia
Still looking for help? Get the right answer, fast.
Get a free answer to a quick problem.
Most questions answered within 4 hours.
OR
Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.