You are correct, it is mentioned that the boys are offered up as a tribute to darker powers. As you say, you know that he gives his sons to the Cold, so let's not go into that. Jon knew about Craster's sacrifices.
"That's pretty." He remembered Sansa telling him once that he should
say that whenever a lady told him her name. He could not help the
girl, but perhaps the courtesy would please her. "Is it Craster who
frightens you, Gilly?"
"For the baby, not for me. If it's a girl, that's not so bad, she'll
grow a few years and he'll marry her. But Nella says it's to be a boy,
and she's had six and knows these things. He gives the boys to the
gods. Come the white cold, he does, and of late it comes more often.
That's why he started giving them sheep, even though he has a taste
for mutton. Only now the sheep's gone too. Next it will be dogs, till
. . ." She lowered her eyes and stroked her belly.
"What gods?" Jon was remembering that they'd seen no boys in Craster's Keep, nor men either, save Craster himself.
"The cold gods," she said. "The ones in the night. The white shadows."
And suddenly Jon was back in the Lord Commander's Tower again. A
severed hand was climbing his calf and when he pried it off with the
point of his longsword, it lay writhing, fingers opening and closing.
The dead man rose to his feet, blue eyes shining in that gashed and
swollen face. Ropes of torn flesh hung from the great wound in his
belly, yet there was no blood.
"What color are their eyes?" he asked her.
"Blue. As bright as blue stars, and as cold."
She has seen them, he thought. Craster lied.
ACOK - Jon III
He decided to tell the Lord Commander about what he thought was shocking.
In half a hundred ways. "He gives his sons to the wood."
A long silence. Then: "Yes." And "Yes," the raven muttered,
strutting. "Yes, yes, yes."
"Smallwood told me. Long ago. All the rangers know, though few will
talk of it."
"Did my uncle know?"
"All the rangers," Mormont repeated. "You think I ought to stop him.
Kill him if need be." The Old Bear sighed. "Were it only that he
wished to rid himself of some mouths, I'd gladly send Yoren or Conwys
to collect the boys. We could raise them to the black and the Watch
would be that much the stronger. But the wildlings serve crueler
gods than you or I. These boys are Craster's offerings. His prayers,
if you will."
ACOK - Jon III
So as you can see, Night's Watch knew that Craster offered his children as prayers or sacrifices. They however most likely considered it Wildling superstition given that they did not believe the Others were truly out there once again.
Before all that, there were occasions on Which Craster referred to his gods in a rather suspicious manner:
"We've had no such troubles here . . . and I'll thank you not to tell
such evil tales under my roof. I'm a godly man, and the gods keep me
safe. If wights come walking, I'll know how to send them back to their
graves. Though I could use me a sharp new axe." He sent his wife
scurrying with a slap on her leg and a shout of "More beer, and be
quick about it."
ACOK - Jon III
And Gilly had also told Sam all about Craster's sacrifices:
There had been no attacks while they had been at Craster's, neither wights nor Others. Nor would there be, Craster said. "A godly man got
no cause to fear such. I said as much to that Mance Rayder once,
when he come sniffing round. He never listened, no more'n you crows
with your swords and your bloody fires. That won't help you none
when the white cold comes. Only the gods will help you then. You best
get right with the gods."
Gilly had spoken of the white cold as well, and she'd told them what sort of offerings Craster made to his gods. Sam had wanted to kill
him when he heard. There are no laws beyond the Wall, he reminded
himself, and Craster's a friend to the Watch.
ASOS- Samwell II
So in conclusion, Craster sacrificed his sons to the "gods" aka the Others as part of a deal to spare him and his. It is unclear why Craster thought the deal would last for long.