I can reply to the bank question, but not the stagecoach one.
TL:DR: The bank, unless the robbery caused the bank to fail, in which case both.
Here's how banking works: banks take deposits from people and lend out the cash to other people. The deposits are liabilities of the bank - that is, they owe that money to the depositors. The bank has assets, which are the loans it makes and the (much smaller) amount of cash it keeps on hand. One way to understand this is to think of a gold merchant.
The gold merchant needs a secure place to store the bullion, so he builds a vault. Seeing this, other people with gold pay him a small fee to store their gold as well. Over time, the merchant notices that the gold at the back of his vault just sits there undisturbed, as people take out and deposit gold, they subtract from and add to the gold near the front. Hey, gold is gold, nobody wants "their gold". Once the gold merchant realizes this, he starts letting people borrow gold. For a fee, of course. As long as everyone doesn't demand all of their gold back at the same time, that works fine. The merchant only needs to keep enough actual gold on hand to satisfy the withdrawals. That's called "fractional reserve banking" and it is what we have today, as well as what they had in the old west.
So now along comes a robber and takes the cash on hand. It belongs to the bank, but they still need some cash to satisfy the demands for withdrawals by its depositors. But the amount kept in cash is much smaller than the amount of loans owed to the bank. So, as long as the entire town doesn't panic and demand cash, the bank can replace the cash owed to its depositors from the repayments of the loans it has made.
If, however, everybody wants their deposits back right now, that's called a "run on the bank". You don't need to be robbed to have a run on your bank - it happened during the Great Depression, too, which is one reason banks were more tightly regulated afterwards. If the run is serious, then the bank will be closed because the bank doesn't have enough cash to pay all the depositors back. In which case, depositors lose money as well.