Pagina EPUB-Checker is a free tool which scans ePub files for validity, and displays any errors it finds.
The program is aimed very much at experts and technical types, but regular users might also find it handy in a few situations.
Our regular ePub viewer wouldn't open a particular file, for instance. Was it the program's fault, or the document? We dragged the ePub into the checker and it reported 63 errors in the file structure. We tried the same with an ebook we could use, and it displayed only 3.
Okay, the actual errors in the report will mean nothing to most people ("File listed in reference element in guide was not declared in OPF manifest: OEBPS/Text/contents.xhtml"), but that's not important. It still gives you a simple measure of ePub "quality": more errors means it's more poorly constructed and less likely to display accurately.
EPUB-Checker could also help you assess the quality of ePub converters. If you have a couple of PDF > ePub programs, say, you could convert 10 test files with each, run the results through EPUB-Checker and see how many errors it reports.