In an ideal world your tenants will be respectful and answer your emails and phone calls either immediately or in a timely fashion.
Sometimes however disputes can arise leading your tenant to claim you are harassing them and spoiling their quiet enjoyment if they are a residential tenant. This then presents you as the landlord with a problem if you self-manage.
If your tenant claims you are harassing them, you are then on potentially problematic ground but you certainly have the right to contact them if essential maintenance work is required. It is essential to have some communication with your tenant and for them not to treat your property as their own when it comes to important things like safety, security and vital repairs.
The main points to remember when dealing with tenants claiming harassment are to be polite in your communications and ideally put your requests in writing.
If you need to access the property at any given time you will need to give notice and ideally bring along someone else who can act as a witness if you encounter any issues.
Ultimately if the tenant is causing too much hassle, start planning how you will evict them and find a more suitable tenant for your property.