You must provide your LL 7 days notice of your intention to terminate your tenancy and specify the reasons therefore. If you believe that the LL's actions have caused the residence to be uninhabitable you can move out and you are not responsible for the rent during any period of time the residence is uninhabitable. If the residence remains habitable, you can stay and reduce your rent by the value of the inconvenience. You can not stay and not pay rent.
Yes, you must provide written notice explaining your specific reasons for terminating. Regarding habitability issues, many states require a tenant to provide a landlord with written notice of same and a reasonable time to fix the problems. Your claims are better supported if you can show that you advised your landlord in writing regarding the plumbing problems.
DISCLAIMER: Brandy A. Peeples is licensed to practice law in the State of Maryland. This answer is being provided for informational purposes only and the laws of your jurisdiction may differ. This answer based on general legal principles and is not intended for the purpose of providing specific legal advice or opinions. Under no circumstances does this answer constitute the establishment of an attorney-client relationship. For legal advice relating to your specific situation, I strongly urge you to consult with an attorney in your area. NO COMMUNICATIONS WITH ME ARE TO BE CONSTRUED AS ARISING FROM AN ATTORNEY-CLIENT RELATIONSHIP AND NO ATTORNEY-CLIENT RELATIONSHIP WILL BE ESTABLISHED WITH ME UNLESS I HAVE EXPRESSLY AGREED TO UNDERTAKE YOUR REPRESENTATION, WHICH INCLUDES THE EXECUTION OF A WRITTEN AGREEMENT OF RETAINER.