I am a student in a country different from where my family is, I want to them during vacation, from where we want to go to Germany. Can I apply for a German visa from that country?
From the point of view of a Schengen country's consulate, a student is normally treated as a resident of the country where he or she is studying. You should therefore apply from that country.
The Schengen Visa Code says, in the first part of Article 6:
Consular territorial competence
- An application shall be examined and decided on by the consulate of the competent Member State in whose jurisdiction the applicant legally resides.
Regardless of where your visa is issued, you may travel to Germany from the country where your family lives, from the country where you're studying, or from any other country.