Ranking points are earned in PvP mode. The more ranking points you have, the higher your rank on the leaderboard. Being at the top of the leaderboard gives you bonuses. The higher your rank on the leaderboard, the better the bonuses!
However, if other players attack your colony and win, then a portion of your ranking points goes to them. If losing points means you are no longer at the top of the leaderboard, you will stop receiving bonuses.
Attack other players to earn ranking points and get the best rewards.