You can send Ally invites after you've battled another player.
After the battle, the Results page will be displayed. In the top right-hand corner of the display window is the Send Ally Invite button.
When you tap the Send Invite button, this screen will come up.
Tap on Yes to send the Invite and you will get the confirmation screen below.
Once you've sent an ally request, you can track it's status on your Allies page. If you want to cancel the request, you can tap the Minus button on the right side.
You can have a maximum of 35 Allies, Pending invites that you've received, and Pending invites that you've sent out, in any combination. If you're below 35 Allies and can't add more, it's because your pending invites are taking up the remaining available spaces. Pending invites do not currently expire, but there could be changes to the Ally system in future updates.
[UPDATE]: 6/19 - Ally Codes!
In addition to sending Ally Invites after a battle, the 2.0 update for the game adds a new option: Ally Codes.
To view your personal Ally Code and to enter another player's code, tap on the Social button that's on the left-hand side of the Home screen:
This will bring up the social screen below:
The code listed can be given to other players to add you directly. Or, they can give you their code and you can enter it in the field and hit Add. Once a request is in, the invited player will need to approve it under their Requests and you'll be all set!