We can currently monitor brain activity (but not thoughts) using a variety of scanning technologies and these are very important research tools. An example would be the use of functional MRI scans to study the operation of psychopaths' brains and how they might be functionally different from "normal" brains (whatever normal is anyway :-)).
Now it's a stretch from that to actually monitoring thoughts, but it's certainly a possibility - i.e. I couldn't rule it out as impossible. We are currently nowhere near able to convert brain activity from such experiments to thoughts - I don't even know of a practical definition for what a thought is, let alone a way to "measure" one, as it were.
But we can monitor our own thoughts : we do listen (or in the case of deaf people, typically see sign language) for our own inner thoughts. Presumably there must be some functionality in the brain that does this. It must be reasonably consistently implemented from person to person, i.e. use the same underlying mechanism. The problem is that it quite possibly involves the entire brain, so in a sense you have to model quite a large part of the brain to relate one person to a "standard".
But it might be possible in the future.
I think more practically we would not bother monitoring thoughts, but simply emotional and physical state. That, combined with simply monitoring location and movement patterns as well as IT activity, possibly eye tracking behavior (e.g. always looking at small children while your brain is in "sexually aroused" mode, or have a pattern of violence-related brain activity while e.g. talking to your girlfriend) might all be used to indicate potential problems and intervene before they become real ones.
You might also want to reference Michael Crichton's "The Terminal Man" for how similar technology could be used to try and prevent thoughts becoming actions.
Regarding the possibilities of using this in prisons, possibly with a therapeutic aspect.
Prisons are (more or less) controlled environments. It's a lot easier to impose a regime of regular (or irregular) monitoring on someone in a prison than outside.
It's certainly realistic to imagine inmates someday being scanned while stimulated by e.g. video, audio, perhaps smells, sensation, to see both how they react (and hence predict possible triggers, issues) and also, longer term, to help work out how effective therapies are working (and ideally use the monitoring to guide the therapy choices).
Scanning systems at the moment are non-invasive. There's no advantage to implanting something if you don't need to. If you get enough from just sitting the inmate in an MRI for a hour to figure out how things are going, then it's fine. I think that's possible (not just plausible, but just not possible yet).
One major issue : what if your monitoring says someone is not responding to treatment ? Do they still get released when their sentence is over ? Should they be kept in prison ? I suspect an effective use of such a system would entail a radical alteration of how we deal with criminals legally - probably an entirely redefined way of looking at the purpose of prison and the subject of constitutional rights.