the theme of Shakespeare's "Sonnet 18" is that his lover is more beautiful and desirable than "a summer's day" because even such a wonderful season like summer has its flip side-it's too short and sometimes too hot. He concludes by saying that he wishes to immortalize forever the beauty of his lover in his poetry.
Towards the end of his life Robert Burns (1759-96) was engaged in the task of collecting old traditional scottish songs. In one of his letters in 1794 he states that the song "A Red, Red Rose" is "a simple old Scots song which I picked up in the country." Hence the poem is not his original composition.
Burns' poem is a song which is set to music and is sung unlike Shakespeare's sonnet which cannot be set to music and cannot be sung.
Both are love poems and praise the beauty of their lovers. Shakespeare merely praises the beauty of his lover but the lover in Burns' song in addition to praising the beauty of his lover swears that he will love her forever:"I will luve thee still my dear/While the sands o' life shall run."
Burns' poem is charmingly simple and direct in its method of praising the lover and most significantly describes how much he loves her:"As fair art, thou my bonny lass/So deep in luve I am." Shakespeare does not mention how much he loves his lover but merely intellectualises his lover's beauty.