Crystals are the premium currency of the game and can be used to unlock random rangers, refill your Ultra meter so you can use it, or buy tickets for events before they start. They can be earned by completing weekly quests, leveling up, competing in special events, purchasing with real money through micro transactions, or selling extras that you don't need.
There is no other way to obtain crystals besides these options. Note that if you sell an upgradeable ranger then they become untradeable meaning you'll never have them again. You should only sell extra rangers if you're not planning on getting any more copies of them from packs because otherwise, it's a waste.