These holes are known as scupper holes. The purpose of scupper holes is to allow water that splashes into the cockpit to drain out to avoid flooding it.