Is It Better To Confess To A Crime?

Is it better to admit to a crime?

.

Is it good to confess?

Is a confession enough to prosecute?