Well, it is not necessarily good water quality as many of these guys need virtually no reason to start spawning...but they can spawn as easily due to sudden stress as happiness. In fact, scientists do some wacky things to get some echinoderms to spawn (temp shock, aggitation, light shock), but that is not for the public boards
Anyway, good water quality should be measured in part by having good test kits and part by looking at the tank- algae balance and animal behavior. But some animals due quite well in 'dirty' tanks, so that is a big topic too. Anyway, it was most likely a spawning male urchin, and time for a good free meal for the tank
but check water tests for more info on the water quality