Can I use an old iPhone as a wifi-only device?
Yes, you can use the device as if it were an iPod Touch without cellular service.  No need to remove the SIM. It will automatically be deactivated when your new phone is activated.

You can also purchase a prepaid SIM from a service using provider network to which the phone is attached if you'd like to use it as an emergency or burner phone. For example, h2o pre-paid SIMS work in locked AT&amp;T phones.