That's a sticky question...
As I recall, the NP242 is a bit stronger (doesn't it have a six-planet input set instead of three? Someone?) and it does have the availability of the "Full-Time 4WD" mode - while the NP231 does not.
I tend to prefer letting my wife have the NP242 - she commutes more than I do, and therefore needs every advantage she can get when the weather hits out here.
Apart from that, I'm inclined to say they're roughly equal - in stock trim. It's easier to find SYE kits for the NP231 - something to bear in mind if you're doing a buildup and need to choose - and both use the same input gears, which means they'll both bolt up to the same transmissions.
Both are also rather widely used, so it should be easy to find a donor case (the principal difference being, usually, the input gear proper. Jeep used at least two - a 21-spline (early) and 23-spline (late,) and more information should be available in a general sense from either Novak Adapters or Advance Adapters.)
They also both have the same low range (2.72:1,) so this is an awfully open-ended question you're asking. Now, if you ask which is better for a specific intended use or application, we can probably give you more useful information - but this is so vague as to make the answer as inconsequential as the question... Can you narrow your question, please?
5-90