No. A landlord is not allowed to legally turn off your electricity or any other Utilities for non payment of rent.
A landlord if they want you out of the apartment or house has to take you to court and sue you for any back rent and the landlord has to also give you an eviction notice and then if you're not out of the apartment or house after being given the eviction notice then the police will have to evict you.
But they're not allowed to turn off your electricity to evict you.