It is certainly legal for a landlord to take a tenant to court if she thinks she has a case. Whether she will win any damages is another matter.
If the agreement was that the tenant would leave the keys in the apartment (a poor practice, by the way) and the tenant complied with that agreement, then it seems that the tenant has vacated and should not be ...
Your contract is the only relevant one in your relationship with your landlord
If they have broken it you can sue for damages. However, you have to actually read the lease to see if they have broken it - if they are doing something the lease permits, they haven’t broken it.