If someone gives you useful information, you can say this. As a full sentence, you would say “That’s good to know.” However, in spoken English “good to know” is more common.
A: She’s really strict about citations so make sure you do those properly.
B: Oh, good to know.
A: If you put out some bowls of vinegar it absorbs the paint smell.
B: Ooh, good to know, thanks!
Usually people say something before “good to know,” such as “ah,” “oh,” “mm,” or “ok.” These noises just show that you listened to what the other person said.