Meaning
An exclamation used to emphasize that one is speaking truthfully; I swear to God.
Literal Meaning
Placing one's hand on a holy book or making a gesture of solemn oath towards God.
Example
“I saw him do it, hand to God, he was the one who took the last cookie.”