The mainly difference, which help to decide the selecting decision for the software design is the embedded mode. H2 supports this kind of the mode while PostgreSQL doesn't support it. Further H2 is platform independent and mostly used for the small application and PostgreSQL only supports some kind of the OS.
Comments
There is detailed comparison and more features is provided, can be useful as well: System Properties Comparison H2 vs. PostgreSQL