Originally a Scottish pet name for Richard, from Old German "hard/strong ruler", Richie/Ritchie is now used as a given name in many English-speaking countries. ONC suggests that the spelling Ritchie is probably derived from the surname.
Thanks to Donald Whyte who provided much of the initial information for this site.