"Is it better to get a computer monitor with a 400 nits brightness rating or a 400 cd/m2 brightness rating?"
If you are comparing two computer monitors and one lists its brightness in nits while the other lists cd/m2 brightness, you're in luck. Nits and cd/m2 are the same thing. Nits is a term that has gone out of favor for measuring the brightness of electronics, but it is fundamentally the same measure of candelas per square meter represented by cd/m2.
When you are looking at either nits or cd/m2, you want to look for a higher number when looking for a screen that can be viewed in brighter locations.
As a point of reference, most LCD monitors are between 200-400 cd/m2. The higher the number, the brighter the screen. To view a screen in full sunlight, you would need a minimum brightness of 800 cd/m2, although 1000 cd/m2 would be more ideal.