Technically they aren't "Challenge" coins, they are Unit Coins. The first time I encountered them was when I was with the 5th SF group in the late 70's and early 80's. Unit coins were given for outstanding achievement or noteworthy actions in supporting ANY unit when an award, ribbon or medal was not warranted or could not be given. It was a MAJOR "attaboy".
For years they were bought by commanders, 1SGs and CSMs out of there own pockets and were meant to keep soldiers motivated in the field or in their normal duties even though they may have only been "doing their jobs"...but in an outstanding manner. While in Berlin I received several from my company and battalion but ALSO from several other units including Berlin Brigade, Command, Intelligence and even support units. Sometimes I received one from a guest unit we might be hosting for CIC training. Most of my unit coins were received for making structured training fun AND interesting. You could receive one for scoring a perfect 40 in marksmanship, a 300 on your PT test, getting your EIB or EFMB when it wasn't expected of you etc.
Many Squad or Platoon leaders who might have more than one would sometimes give one up to an outstanding soldier of theirs who might not otherwise be recognized. They were also given as "on the spot" awards during training. I personally received one for helping the Romanian refugees (quartering and feeding) and even one for being personally commended by President Reagan for the sharp appearance of my squad when he came through a hanger we were "resting" in during his "bring down this wall" tour. I guess they thought we'd look slovenly or he just got used to the way soldiers in the West looked before coming across the frontier. (???)
As for them being used in "challenges