With legislation introduced or expected in many states, the debate is intensifying between advocates and opponents such as teachers unions.