So you want an app, but not sure which phones you should support. This question has a three-part answer: platforms, legacy operating system versions, and actual devices.
Platforms
There are four main current mobile platforms, including Android, iOS, BlackBerry 10, and Windows Phone. There are also some legacy mobile platforms, including Windows Mobile and the original BlackBerry devices (like the Torch). Last, there is a new class of app platforms emerging, ranging from wearables (smartwatches like the Galaxy Gear, Pebbles, and the upcoming iWatch), alternative mobile platforms (like the Amazon Fire and Samsung’s Tizen) to smart appliances (the smart TVs and fridges of the world).
Choice is great for consumers, but does introduce an interesting problem for a company looking to create these digital experiences: in which platforms should I invest? The answer is, as usual, it depends. It depends on which platforms support the functionality you want to deliver; if you want to create a replacement to the lock screen, iOS will not be the platform for you. It depends on which platforms have your target market; if you are targeting a large company, they may provide only company-controlled BlackBerries to their employees. It depends on your budget; if your app absolutely must be available to everyone, then you will need to target all of the platforms.
Legacy operating system versions
This is strongly related to the next answer about devices, as all device manufacturers eventually stop supporting older devices. A typical lifecycle for mobile device support is about 3 years. That is, a device bought today will likely not be supported with new operating system versions 3 years from now.
Regardless of the hardware that makes up the device, there are many structural changes to the operating systems that happen over time. For example, the change from iOS6 to iOS7 changed how everything looked. The change from iOS7 to iOS8 changed how apps asked for permission to use your location. The change from Android 2.3.3 to Android 3.0 added the Action Bar, the most common interface element in the Android ecosystem.
When you build an app, you absolutely must support the most recent versions of the mobile operating systems because this ensure your app will be supported for the longest possible time; however, what should you do about the older versions? One solution is the build the app for the lowest version number you want to support; this will artificially hamper your app on the newest phones, but ensures that the most people possible will be able to use your app. Another solution is the build the app for the most recent version, and then back-support older versions. Neither approach is particularly elegant.
In the end, supporting older versions of devices will always increase the cost of development, because the developers will have to build and then re-build parts of your app to accommodate every legacy version of the operating system you want to support. Both Apple and Google provide stats showing how many devices are currently on each of their operating system versions, providing good data points for you to decide which versions your app should support. Note one piece that is missing from that data point though: your users. Although these stats show the split of all devices, this does not tell you what versions your target market is actually using. All-in-all, the tradeoff is clear: the more older devices you want to support, the more your app will cost to build.
Devices
The last part of the three-part answer is the devices to support. This is tightly-coupled with the legacy operating system answer above, but there is more to it than just which version they are running.
Device manufacturers provide a huge range of technical specifications in their devices. This ranges from screen sizes and touch screen quality, to the camera capabilities, the amount of memory the device has, as well as which sensors the device has (GPS, accelerometer, heart rate monitor). If your app requires heavy processing (e.g., fancy animations), a user’s experience on a lesser quality (or older) phone won’t be great. You should either not support older devices, or provide various modes to support the different capabilities. For example, you could turn off animations if the phone can not render them smoothly. You could load lower quality images in the app for phones with less memory. You could add support for a heart rate monitor, but only on devices with that capability.
Conclusion
Overall, there are many tradeoffs when considering which platforms and devices your app should support. At a high level, you want as many people in your target market to have access to your app, providing avenues for increased sales. This requires you to understand your target market. What platforms do they use; what phones do they have; what version of the operating system are they running? These fundamental questions will help you to make better decisions about where to invest in your mobile solutions.