Keys are needed to open Silver chests you obtain after winning Boss Battles. You also need them if you want to access a “farm” level that you have already played. “Farm” levels are highlighted in gold color and allow you to collect either gold or shards.
Keys will automatically recharge for you. If you temporarily run out of keys, you can still challenge and defeat Bosses and receive other rewards.
Additionally, the rewards received from Badlands and Tournament nodes do not require any keys.