As Huck Finn has many Christian themes, that is of course a reference to praying to the Christian God, who, in Christianity, is omniscient (all-knowing), so God would know when someone lied, and lying would be a sin against God. Therefore, to pray on a lie is contradictory, since a person would technically be praying for a sin.