There are many laws that regulate the rights provided to both landlords and tenants. Tenants are protected from many things, but as the owner of the property a landlord may choose to renew the lease or not to as it pleases them. Granted, this is at the end of the lease, so this does not mean that the landlord may simply evict the tenant for no reason in the middle of their lease. Written notice is usually required if the landlord will not be renewing the lease and local laws will likely state when this must be provided.
There are exceptions to this, of course. If a tenant lives in a rent stabilized unit the renewal of leases are handled differently. If a unit is considered either rent controlled or rent stabilized, the landlord may not raise the price to market value until the tenant leaves. Because of this, the law limits the landlord and will not allow them to simply refuse to renew without reason.
Another exception to the landlord's right to refuse to renew a lease is if they are doing so for discriminatory reasons or in retaliation against the tenant. If a tenant complains, a landlord may not choose to renew their lease simply because they are irritated. In the same fashion, they may not ask the tenant to leave because of their gender, religion, race, etc etc.