Tom Robinson is accused of rape because Bob Ewell discovered his daughter with Tom in their home. It was inconceivable that Mayella would have made advances toward a black man... so he was accused and convicted of rape based upon the color of his skin.
To Kill a Mockingbird