Martin Schulz was voted as president of the EU by a vote of all MEPs, in a similar way that the Speaker of the House of Commons is elected by MPs in the UK parliament. In Schiulz case, he was elected to the EU Parlaiment by the voters of a constituency in Germany , the same way any other MEP is elected and therfore has a mandate from the people and has the right to vote, in the same way as an MP can vote in the UK.
Jean-Claude Juncker is also voted for by MEPs in the European Parliament, but since there is no necessity for the President of the European Commission to be an elected MEP, i.e elected by a popular vote, he has no voting rights himself.
Donald Tusk was chosen by the political leaders of the member nations of the EU. As with Juncker, there is no pre-requisite of a popular vote to the Council for the role and so the President of the European Council has no voting rights in the Council (although they could if he/she was also a sitting political head of a member state, like Cameron).