Both the spellings are correct; which one is used depends on the context, and the English dialect.
As reported by the New Oxford American Dictionary:
In British English, the normal spelling in general contexts is judgement. However, the spelling judgment is conventional in legal contexts, and standard in North American English.