Usually speech problems are caused by hearing problems, problems with the technique to make certain sounds or lighter disabilities (heavier disabilities can be a reason as well, but I am sure you would be aware of them at this point).
the most likely (and best) scenario, technique problems
Children learn speech by mimicking their surroundings (mostly their parents). But not every sound is easy to mimic, sounds like the sound of vocals are clear to hear and the movement of the mouth is easy to see, letters like for example b, p and w are often not as clearly to hear, especially if dialect is involved but the mouth movement is still easy to see.
But letters like r and l are much more problematic, they are often unclear pronounced (sometimes different in different words), and the movement of the mouth is not visible to the outside.
Kids have generally much more problems learning the pronunciation of these letter. Here in Germany where the r is actually pronounced with your throat and not like other letters with the tongue, it is not usual for children to still pronounce the r wrong when the are at the age of 10.
Your description sounds absolute typical for this scenario, especially that your children can pronounce these letters within words.
The best way to "fix" this would be to let your child repeat misspoken words correctly, while saying correctly yourself. If he for example says "Aaight" instead of Light, you show say the word correctly "Light" and let him repeat it. If he fails, say it together with him and let him then repeat it two or three times. Also tell him what to do with his tongue if he struggles for more than three attempts.
If that doesn't help
It is unlikely that your child has deeper problems, but if you get the feeling that he doesn't make any progress even though you are trying to help him, you can consider hearing problems, and let a Dr. check him. (But again your description doesn't sound like something like that).