It's definitely RNG, but you simply get more chests if you contribute more to a fight. Usually if I join a fight that's ending I get maybe 4 chests total whereas if I did a lot I'll get 8-12, which means more likely to get more souls. Also as someone mentioned if you're the one that starts it pretty sure you always get one.