As Forbes says, it can seem to us as actors that there is never a logic at work here. But of course there is - it's just we're not privy to its workings.
Broadly, you can make the best judgements as to how long a (potential) reply might take, based upon what you know about the project.
Something that is shooting/being performed very shortly will have to let you know quickly if you are involved in it. This is partly because of the obvious - the shoot or play is scheduled to take place two weeks on Friday, or whatever. Also, because if you are being cast at very short notice, it is often an indication that the rest of the particulars of this project is in place, and the casting of the final few actors will cement the set - up. In these sorts of instances, it is not as difficult for clear decisions to be reached by casting directors quickly.
For casting in a project which might take place many months later, immediate response is far from predictable. The casting director may well have additional concerns besides your audition in, say, the two months prior to opening/filming. There may be a need to go through an extensive comparison of your performance with the performance of other members of the cast. The Casting Director may have a whole series of auditions to do in sequence, putting aside the notes written at the first audition until such time as everyone has been seen, and matters can be reassessed. This might conceivably take months to reach fruition. And, indeed, if the main emphasis is on securing 'name' actors for the main parts through extensive negotiation, then confirming who is playing in support is going to take a back seat for a while.
Finally, although we don't like to ask, I suspect, how many parts do you think you sometimes get when a first choice has dropped out or proved unavailable? Suddenly, a call you didn't expect emerges, after several months, seemingly 'out of the blue'. Maybe you were being held on a reserve list, and it took a while for your time to come.
Equally, if they thought you were tremednous, and they are now scared of losing you if they don't act fast, you may hear about a result within a matter of days. All of this is hugely variable, but not hugely unexpected.