It's not illegal per se; at least in a "criminal" sense. It's just an element that a plaintiff would use IF s/he sued for age discrimination. Of course, that would mean that this individual would needed to have applied and then been turned down. Additionally, you'll be lucky to find one single attorney in the U.S. who would even bring the suit, because you'd have a hell of a time getting a judge to apply U.S. law (under personal jurisdiction). So bottom line, he'd very likely be fine asking for the age. I wouldn't recommend it unless it was necessary, only because it might run afoul of Germany's laws, which I am not familiar with.