Within a word, if ㄹ is followed by a vowel, as in "별이," ㄹ sounds more like an R. When words end with ㄹ or are followed by a consonant, like 별 by itself or 불러 for example, ㄹ sounds more like an L.
In your first example 별이 is one word that means "star" with the subject marker. 'The star (subject) that shone/shines in the sky'
In the second example, the word 별 is followed by a second, separate word "이" that means "this." 'You're the biggest star in this world.'