Why is a 20 byte hash acceptable in p2wpkh but p2wsh needs 32 bytes? Why is it acceptable to use a  20 byte hash to represent single-sig witness programs whereas a 32 byte hash is used for pay to witness script hash?
As per this post by Gregory Maxwell, HASH160 provides enough security for the trivial case of public key hash based addresses, whereas script hash addresses can benefit from the additional protection against collisions provided by a longer hash.

The rest of the thread covers more details of the benefits of moving to sha256.