It seems that tight in this expression is the equivalent of the only surviving use of the adverb tightly meaning soundly, properly, well, effectively. The full Oxford English Dictionary labels the adverb now dialectal and the adjective colloquial. The phrases Good night and sleep tight are conventional (rhyming) formula used when parting for the night or at bedtime.