Rapid points... how are they determined?

The number of points won or lost depends on a few factors.
- The result of the game (win/draw/loss).
- The rating difference between the two opponents.
- How many games you have played recently.
If you haven't played much at this particular time control (for example: a brand new account) then the rating swings for wins and losses will be very large. I stopped playing on chess.com for a couple of years while I was working at the Tactics School, and when I came back to chess.com my first rated game gained me over 100 rating points in a single game!
After you have played several games in a row at that particular time control (Daily, Rapid, Blitz, or whatever) then your gains and losses will drop to single digits.
The idea is that the big rating swings in the first few games should enable a new account to quickly "home in" on an approximate rating, and then the smaller swings will fine-tune it.