The short answer is no. Closing out an old credit card can actually drop your score. If the balance is $0 then this account is helping your utilization. Remember the credit bureaus want to see cards under 30%. If you have 2 cards with balances and 1 card without a balance, that card is helping your overall utilization. If you close that card your score will likely drop.
Closing a card also affects your credit mix and credit length. These categories can also cause your score to drop some by closing out a card.
Sometimes a card is closed by the bank or lender. There are multiple reasons why this can happen. This can happen if you have not used the card in a long time. I suggest using a credit card at least once every 6-8 months to avoid having it closed automatically. Use it wisely and only put a few dollars on there. No need to go spend hundreds of dollars. Pay it off and then use it again a few months later.
Another reason that a credit card could be closed by the lender is due to your credit score. Banks will sometimes run your credit without your knowledge. This is a soft pull and doesn’t affect your score. However, if they notice that your score has dropped or your balances are just to high for their liking, they can close the card down. I've seen this time and time again. It is their card and their money and they have the right to do so.