A state senator who was caught in a sting operation has resigned under fire after he was charged with soliciting a minor for prostitution.