The rasta hat in Dino Run is earned by reaching level 9 in the game's multiplayer mode. Keep playing matches and leveling up, and once you hit that milestone, the hat is yours to equip.
It's a fun cosmetic reward for putting in the time in multiplayer, so stick with it and you'll unlock it before long.