Does a batter get an RBI with a batter on third with a wild pitch or passed ball?

Only if the bases are loaded and the wild pitch or passed ball is ball four.