why is dobrou?
You can think of it as a shortening of this phrase: Přeji ti dobrou noc. (I wish you a good night.) The verb needs to be followed by accusative case as was correctly mentioned by BoneheadBass. Dobrou is the accusative form of dobrá.
"Noc" is feminine and in this sentence it's in the accusative case. So the adjective "dobrá" becomes "dobrou." Hope this helps!
Think of the accusative case as the "direct object" case.
Note that grammatical cases have not been taught at this stage of the course yet.
I chose "Děkuji Dobrou" and it was accepted.