Before you can deploy any app to physical iOS devices other than your own, you need to be a registered Apple developer. In the past, Apple required you to pay $99 USD per year to test apps on even your own physical devices, but this requirement has been lifted since the release of iOS 9. While this assists with your own testing, you'll still need to pay the subscription fee to deploy your apps on the devices you don't own, which is usually the point.
Google only requires an account when you intend on submitting your Android app to the Google Play market. Until then, you don't need an account. As of this writing, this costs a one-time fee of $25 USD. However, for consistency, we'll go over registering yourself on both the platforms in this first section.