Coins are used in the game to obtain basic outfits for your Hatchlings. After you have used keys and claimed the free chest, those coins can also open basic chests.
You will earn coins in the game as a reward for passing levels. In addition to the level rewards, you will receive additional coins as an outfit bonus based on your outfits. Each outfit provides a certain coin bonus. You can check a bonus you will get from owning an outfit in the Collection menu, while a precise amount of bonus coins is displayed upon successfully completing a level.
Coins can also be used to upgrade hatchlings' outfits; however, upgrading an outfit requires coins and yarn.