Breast milk can safely sit out at room temperature for up to 4 hours and if you do not use the breast milk within 4 hours it should be frozen or refrigerated to keep it from going bad.
If the breast milk has been left out of the refrigerator longer than 4 hours at room temperature then it should be thrown out and not fed to your baby as it could make the baby sick.
Always keep the milk refrigerated if you're not using the breast milk within 4 hours and the sooner you refrigerate the breast milk when not using it the better and longer it will last.
However frozen breast milk should always be thawed out in the refrigerator and not thawed at room temperature because it can grow bacteria and go bad.
Always thaw the frozen breast milk in the refrigerator.