According to what the devs have stated in the main war thread (I believe you can find it in this thread: Alliance Wars Matchmaking (Discussion & Developer Response) MASTER), the process goes like this:
- The message on the war tab states that the next war starts soon (something like that). This is a 24-hour time frame.
- Although that message lasts 24 hours, it only takes the last 3 hours of that message to do the matching. At the start of that 3 hours is when the snapshot of all alliances are taken. Everything is based on where the alliance stand at this time.
- During the 3 hours, the system creates an updated war score and matches the alliances against similar alliances.
- At the end of the 3 hours (the last of the before stated 24 hours), the ‘Alliance Wars start in 1 day’ message is broadcast. This is the Prep phase where you can see your opponent and your battlefield.
- At the end of the prep phase, the war starts.