Once you join or create a team, you can participate in the Team Chest event. You can earn Keys by winning puzzle levels, but only while the event is active.
Also, you will not earn Keys if you left the team you were in when the event for the week had already started. You'll need to wait until the next Team Chest event starts in order to earn Keys for the team.