My guitar string is ringing after the intended note duration and I am having a hard time muting the open strings. It is like the LET RING technique of guitar. So when do you know if you should stop the strings from resonating or letting it ring?
Traditional classical guitar methods (e.g. Carcassi) teach one to let the open strings ring in resonance with the notes played to increase overall volume and improve the tone of the guitar. This is not the same thing as stopping a plucked note once the sheet music indicates that its time is over.
As Tim's comment points out this is somewhat of a personal choice that should be motivated by whether it sounds good.
There are some principals that can be used to make good choices. Here are few examples.
If you are playing a piece that is mostly open string chords and the ringing is in tune with the rest of the notes, let it ring as that will generally help with volume and tone and not be dissonant.
If the music states that notes are separated then you should try and mute them. If you are playing written pieces from sheet music then there are probably instructions for what the composer or arranger intended the music to sound like.
Regardless of the situation, if some of the melody or chords change key but open strings are still resonating in another key then you should probably mute them. It often happens that a piece will change from minor to major on the same root, or there may be a chromatic passing chord. Take, for example, C maj going to C min. If you play the open C maj chord with the 3rd on the D string the open E string will vibrate in sympathetic resonance. This will be loud enough to hear even when you lift the C chord up to mute it. If you were to play C- after C by lowering the E to Eb on the D string that would create a (E, Eb) harmony. The E harmonic would die soon enough and if the Eb were plucked you may not hear the dissonance or be offended by it. Really, you need to play with some of these and decide for yourself what you like and don't like. Some people may find the conflict between the open harmonics and the other notes interesting.
If the resonance becomes deafening and the true melody and harmony are hard to distinguish then it's time to mute. This can happen. On a really good acoustic guitar each new note plucked will feed energy to the resonating open strings, especially if the note matches one of the natural harmonics. Depending on the situation this can cause "reverb" to increase and eventually become too much. This is especially important if the dynamics are piano or quieter.
If you are playing something fast chances are that the quick release of the fingers to the next note will be enough to shorten the sound, but there is also the chance of creating open string notes every time you lift. This is where practice and good technique come in. You just need to practice developing a delicate sense of touch and you will be able to move without creating scrapes, squeaks, clicks, and open string hiccups.
Lastly, if the piece is meant to be percussive then you may be playing with the edge of your hand on the strings or slapping down between chords to stop everything.
Keep in mind there are competing factors in the decision. You may be trying to play a piece that everyone knows and want it to be faithful to the artist. You may be trying to develop your own style. Or, you may be trying to get through a music curriculum with guitar as your instrument. What sounds good to you may not to others, or to your instructor. Also, sometimes we just default to what is easy rather than develop good technique. You can work on a piece and take advantage of open string resonances only to hear a judge or your teacher say "why are you letting it ring like that, sounds awful" or you may mute and hear "it sounds dead, let the strings ring". If you are serious about getting the techniques correct, (1) take lessons, and (2) try multiple ways of playing the same piece until you converge on an approach that you really like. Then your choice is an artistic one.