Many countries consider themselves allies of the US, but few take foreign policy stances just because the US says so. (The US also does not always vote the same way as its allies.) The vast majority of the world consider the US embargo to be an act of revenge driven by the interests of Cuban Americans, and others who had property confiscated at the time of the revolution, and consider it completely unjustified as a matter of foreign policy, so they vote against it.
Israel as a country is absolutely indebted to the US. The US is virtually the only country not condemning at least some of its actions in Palestine, and continuing to supply it with extensive military and civil aid without conditions. Without continued support from the US Israel (or at least its present policies) would be in severe trouble.
Israel therefore, when asked to take an action that doesn't really inconvenience it much, votes with the United States. It isn't in a position to disagree with the US on foreign policy.