Why has no Jewish candidate been elected president or vice president and not many Jews have been justices of the Supreme Court?
Before answering this question, I would take issue with the last part of it, in which you state that there have been very few Jewish justices on the Supreme Court. There have been 8 Jewish justices in history and the 9 justices who are currently sitting on the Supreme Court include three Jews. The three are Ruth Bader Ginsburg, Stephen Breyer, and Elena Kagan. In other words, there are a relatively large number of Jews on the Court right now and, as we will see in a moment, the total number of Jewish justices is really not that low.
Moving on to the actual question, I would argue that there are two reasons for the phenomenon that you describe. One is the relatively small number of Jews in the United States. The other is the amount of prejudice that Jews have faced, particularly before the last few decades.
The Jewish population of the United States is not very large today and it was even smaller in the past. Today, Jews make up about 2% of the population (depending on the definition of “Jew” that is used). If Jews make up 2% of the population, we would expect that about 2% of our presidents and vice presidents to have been Jewish. To date, there have only been 44 presidents and 47 vice presidents. Two percent of 44 is less than one. That means that, simply based on statistical probability, we should not be surprised that no Jewish president has been elected. This argument becomes even stronger when we note that there were even fewer Jews in the US for much of our history. Jews made up only about .7% of the population in 1890, which indicates that it would have been very unlikely for any Jew to have been elected president to that point in history. In short, since we have very few Jews in this country, we should not expect that a Jew would have been elected president by now.
This is also why I dispute the idea that there have been few Jewish justices on the Supreme Court. If Jews make up 2% of the population today and about 7% of all justices (8 out of 112) have been Jewish, it is very hard to argue that Jews have been underrepresented on the Court.
The second reason why there has not been a Jewish president or vice president is prejudice. Americans have historically distrusted Jews. This has been caused in part by religious factors. Christians around the world have been anti-Semitic for much of history. The idea that the Jews were responsible for the death of Christ has been a major cause of problems for Jews around the world. Americans have also looked down on Jews for more secular reasons. Some Americans have believed, for example, that Jews are greedy and miserly. These kinds of attitudes have made it less likely that Jews will run for high office and have made it harder for them to hope to win. This may be one reason why Jews are overrepresented on the Supreme Court (to which they do not have to be elected) but not in the presidency.
Overall, then, I would argue that anti-Semitism has hurt the chances of having a Jewish president. Even so, the larger factor is most likely the relatively small population of Jews in the United States.