Your iPhone or iPad will become a lot less useful when they don’t get the latest version of iOS.  This is because a lot of times apps have minimum iOS requirements for their new versions.  So for example my 2010 vintage 4th generation iPod Touch can’t get the latest Skype app because it requires iOS 8 and I can’t upgrade it past iOS 6.  The biggest upgrades subsequent iOS devices are getting is the (often) doubling of their RAM.  For example the 4th generation iPod touch had 256 MB of RAM where the 5th generation one had 512 MB.  Similar RAM upgrades are present in the iPhone and iPad line as well.

Newer versions of iOS often require more RAM and this means that some old devices (particularly when RAM has doubled twice after two cycles) will be dropped off.  So if you are planning on buying an iOS device, my advice would be look at how much RAM it has relative to the other iOS devices on the market.  For example, the iPad Air 2 has 2 GB of RAM verses the iPad Air’s 1 GB so I’d say the iPad Air is much more future proof.  Same with the iPhone 6s which has twice as much RAM as the 6.