With my best educated guess it's just like knowing when the triangle in a shape pattern comes up again.
They know what the moon looks like if it was night time and so they say "Hey, since we got this moon phase right now then this other moon phase is going to be tomorrow!" and so they keep going.
With the knowing when the next blue moon or blood moon will come they look at other times it has happened and connect the dots telling them "Every this amount of days the blue moon will come." Again this is just my educated guess so I could be a correct but it be more science to it.
Hope at least I gave you a good idea.