that is because you would not usually say "have you worked yesterday" in English. It sounds wrong because the "yesterday" defines a limit to the time that rules out a continuation into the present which is implied in the use of the English present perfect. Even though the Italian uses that tense in conversation in much of the country you still have to translate into acceptable English usage. In some cases English would also use the present perfect in the translation of passato prossimo but in other cases (such as this) simple past tense is the preferred translation.
I'm a native speaker of English and retired foreign language teacher and linguist. "I have worked yesterday" is impossible in English and certainly would seem odd to most English speakers. However, hai lavorato ieri is just fine in Italian. However, we normally ask: Did you work yesterday? Don't be too hard on DuoLingo as trying to teach proper verb tenses by using single sentence translations is linguistically impossible. Why? The verb tenses are not one to one in many languages and every language has unique features for conveying meaning. For example, Russian has five tenses for the six in English. Clearly, sometimes the meaning overlaps and sometimes it doesn't.
"Had you worked yesterday" is a different tense, it's the pluperfect. The sentence you would use here in English is "Did you work yesterday?" That's the question form of the preterite (the "I worked" tense). The Italian used the perfect tense (the "I have worked" tense), but we can't do that in English because of the adverb specifying when the action was (yesterday). The split between when to use the perfect and when the preterite tense is often different in English compared to other languages, with English tending to use the preterite more than other languages. Indeed, there are even some differences between regional varieities of English, with American English using the preterite tense more and British English using the perfect tense more. In general if you see a sentence written in the perfect tense in Italian you get to choose between a preterite (I did) or a perfect tense (I have done) in English, but not a pluperfect (I had done). Or at least that's how it works with German and Dutch and Duolingo is making me think it works the same way with Italian.
"Lavorato" is a verb, you cannot translate it with a noun. Also you cannot translate "hai", because it is just an auxiliary to the main verb.
Hai avuto lavoro ieri?
- (literal) Have you had work yesterday?
- (correct) Did you have work yesterday?
Hai lavorato ieri?
- (literal) Have you worked yesterday?
- (correct) Did you work yesterday?