The discipline of members of the U.S. Army and Air National Guard is conducted under the individual state's code of military justice, e.g., West Virginia's code. When Guard members are activated into federal service under Title 10 U. S. Code, sometimes called being federalized, they are covered under and disciplined in accordance with the federal Uniform Code of Military Justice (10 U. S. Code 801). That's the simple answer, but this link will show how there can be complexities.
All states have some form of military justice code which are generally similar. They are often modelled on the UCMJ or the Model code. A difference from state to state is that prosecution of military offenses actually happens in a civilian court before a civilian judge rather than at a court-martial.
There have been criticisms of how the Guard is disciplined, or in many cases not disciplined. Some time ago now, a significant issue arose in Alaska. Actually, the issues are not limited to Alaska. See, e.g., here or here or here or here, again in regard to the investigation and disposition of sexual offenses [note, I'll say no more on the specifics--hint, think privilege]. An official report on Alaska is here. The surfacing of problems should come as no surprise because the underlying issues (re)gained a lot of traction across the active, Reserve, and Guard force around 2006 and concern and attention has snowballed (sorry, I'm snowed in here :-)). 2KTUU reports:
A bill that would update Alaska's Military Code of Justice and strengthen penalties for certain violations has advanced from the House Judiciary Committee.
For a good discussion of the topic see Major Robert L. Martin, Military Justice in the National Guard: A Survey of the Laws and Procedures of the States, Territories, and the District of Columbia, ARMY LAW (Dec. 2007),
The bill would update a code that has been largely unused by the Alaska National Guard. The Guard has not used it to court martial a service member since 1955.