First why Riley is a nerd is because he does home work instead of hanging with friends. When you decide to ditch your friends to do homework you are not only being a huge nerd but letting your friends down. Which in the future can make you lose your friends. In doing so you become even more of a nerd. In recent texts between Riley and some of his friends he said "sorry I can't come out I have to do homework", this proving that Riley is a nerd because he dose not value friendship.
Second reason is he goes to finance club. The finance club is basically nerd head quarters, yes some people who go to finance club are cool