Well spotted! Duncan, having given out his rewards and prizes, annouces that he will official make Malcolm the heir to his throne:
We will establish our estate upon
Our eldest, Malcolm, whom we name hereafter
The Prince of Cumberland; which honor must
Not unaccompanied invest him only,
But signs of nobleness, like stars, shall shine
On all deservers.
The nobility and the desert of the awarded nobleman shall "shine" out like stars. Good qualities send light out into the heavens: visible to all.
Macbeth, in his aside at the end of the scene, has an entirely different thought about the stars:
Stars, hide your fires;
Let not light see my black and deep desires.
Just as Duncan wants the nobility of his kinsmen to shine like stars, Macbeth wants the stars to hide their light, to make things less visible. Macbeth wants his black and deep desire to be unseen - to remain in the dark.
Hope it helps!