All three talk about frequency of occurrence for something within a population of things
rare
does not occur as often as
uncommon
does not occur as often as
common
ordinary
"scarce" has more of an absolute meaning of "hard to find or obtain" sometimes do to very high demand or very low supply
Available tickets to the playoff finals are very scarce since everyone wants to go.
Snow in the Sahara is uncommon and would be a rare occurrence.
Potable water in the Sahara is scarce.
If you say something is "uncommonly good" it means it is "more than very good", however, if you say something is "rarely good" it means it is "not often good" or "usually bad".