Denatured proteins are released from the dal when it is in contact with water for long time in summer.
When these denatured proteins are mixed with the water then it forms the foam. As these process requires more temperature and hence it happens quickly in summer.