Um, that's actually incorrect, though those two are the only ones who served in active combat in wartime.
Charles did serve several years on active military duty, though he did so in peacetime. His sea duty lasted from 1971 through 1976. During that time, he served on a destroyer and two frigates, and in his final year of service commanded a minehunter. He also flew helicopters in the Royal Navy, and served on the carrier HMS Hermes as a pilot. William also served on active duty, but was never posted abroad. He served first in the Army for two years, then transferred to the RAF and served another 5 as a search-and-rescue pilot in the branch that is equivalent to our Coast Guard.
It's odd for Americans who are used to seeing veterans of all services wear their uniforms (or parts of their uniforms) on ceremonial occasions, but UK military regulations don't allow it unless you're still in the reserves. You can wear your decorations on civilian dress, but not the uniform. The reason that members of the Royal family get to do it is that they serve on service boards, and thus have honorary rank as long as they continue to do so. Due to their situations, Harry & Andrew no longer have those board appointments, and so, no uniforms.
Anne and Edward do have purely honorary appointments that come with board service. (Edward did briefly join the Royal Marines, but took the UK's standard option to voluntarily leave basic 6 weeks in. I'm actually rather surprised that he's appearing in uniform, because he has said in the past that he doesn't feel comfortable doing that. Probably the Queen's expressed wish.)