This line comes form the Prologue, spoken by Machiavel, that is, the Florentine political philosopher Machiavelli, a symbol of unrestrained immorality in the Elizabethan period:
I count religion but a childish toy,
And hold there is no sin but ignorance.
Birds of the air will tell of murders past!
I am asham'd to hear such fooleries.
The second line makes it clear that Machiavel considers religion nothing but a childish toy, since it promises divine or supernatural retribution for sin. The position of Machiavel, on the other hand, is that anything one can get away with is permitted. At the end of the Prologue, he explicitly lays claim to Barabas the Jew as one of his followers:
But whither am I bound? I come not, I,
To read a lecture here in Britain,
But to present the tragedy of a Jew,
Who smiles to see how full his bags are cramm'd;
Which money was not got without my means.
I crave but this,--grace him as he deserves,
And let him not be entertain'd the worse
Because he favours me.
This, like the words of the Witches in Macbeth (but in a far cruder way), signals to the audience that the character in question is evil and probably doomed to come to a bad end.
I suspect Marlowe is having this fictional character (the "ghost of Machiavel" - a fairly straightforward link to the real Machiavelli) mock religion as a thing suited only to children's minds; he goes on to suggest that "ignorance" is the problem for adult minds.
The audience might not take this character's views too seriously (it was a deeply religious time) but Marlowe would still have managed to plant negative ideas about religion here. Although this play is a fiction, in real life, Marlowe seems to have questioned supernatural ideas and included religion in these.