A letter to the editor, itself, has little value for your CV. A letter that is selected for publication in a peer-reviewed journal demonstrates a certain level of peer review for your ideas, by the qualified editor, at least. It is nowhere near as noteworthy as a blind-peer-reviewed publication in a prestigious journal, but it may show a certain level of scholarly work.
It may depend on whether your school assigns value to such letters to the editor.