How can I stop my 8 yr. Old son to stop wetting himself at nighttime when he goes to sleep?

A common problem. Although we think of school aged children as fully trained, even at age 8 bedwetting is not uncommon. Avoiding evening beverages, toileting just before bed, and waking in the night to go may help. See your pediatrician, who can discuss bed alarms or, as a last resort, meds; occasionally medical problems, like diabetes or sickle cell trait, can manifest in this way and should be evaluated.
Time. It is not uncommon for school aged kids to still wet the bed. Limiting drinks helps some kids, but not all. Waking kids is counter productive since then they are more tired, and that is when they are more likely to wet during sleep. They should not get in trouble, it is not in their control. Ask your doctor if any treatable sleep disorder associations are there (tonsils, sleep apnea are big ones).