The main reason a frog croaks at night is to attract a mate. Male frogs croak in order to attract female frogs around a pond.
Female frogs listen to the croaking of male frogs, and this helps them choose the most suitable ones for mating. Another reason for which male frogs croak is to claim territory. By croaking loudly at night, a male frog warns other males that a particular part of a territory is already occupied. Not all frogs croak the same, with larger males emitting powerful croaks, and smaller ones producing weaker croaks that resemble a bird’s chirping.