Colorado law implies a covenant of quiet enjoyment, and this protects tenants' privacy in principle. However, enforcement is difficult. Your landlord may inspect, do repair work, or show the premises to prospective buyers without notice and at any time if the lease states that the landlord has retained the right to control, re-enter, or repair the premises. To protect his/her right, a tenant should negotiate with his/her landlord to include language in the lease assuring his/her right to privacy. The Boulder Model Lease spells out terms for entry by the landlord: "Resident shall permit owner/agent to enter the premises at reasonable times and upon reasonable notice for the purpose of making necessary or convenient repairs or reasonable inspections, or to show the premises to prospective residents, purchasers, or lenders. Entry may be made without prior notice only if owner/agent reasonably believes that an emergency exists, such as a fire or broken water pipe, or that the premises have been abandoned." If your lease allows the landlord to enter your home, try to include a requirement for the landlord to give reasonable notice prior to entry and that such visitations be at reasonable times.
The Boulder Housing Code requires that entry be permitted for reasonable inspections and repairs related to the Housing Code.
If you believe that your landlord is harassing you, you should try to resolve the problem by negotiating an agreement with your landlord regarding entry, including the reasons, times, and notice required for such entry. If you cannot obtain the cooperation of your landlord on this issue, you should seek advice from an attorney concerning taking legal action against this perceived harassment. If your lease provides your landlord with the right of entry or the right to retain control of your residence, and you deny him/her entry, he/she may begin eviction proceedings against you. However, threats, intimidation, and continued invasion of your privacy need not be tolerated. If intrusions persist, seek legal advice.
Unless specified in the lease, there are no laws against your replacing locks on the premises if you wish to prevent unreasonable visits by your landlord. However, you will be liable for any damages, and the landlord can retain from your security deposit the cost for removal of your locks. Before you consider denying entry to your landlord for any reason, seek legal advice.