Deserters from the Virginia militias faced the "general discretion of the court martial" for the first two years of the Revolution and then a fine not more than two month's pays or imprisonment of not more than one month. In the fall of 1777, additional months of service was the most common form of punishment. A bounty was also placed on deserters (of varying amounts, thanks to inflation).
Broadly speaking, Virginia used both the carrot and the stick, proclaiming an amnesty in 1780 for deserters who returned to the fold, but also threatening a punishment of five years of service for those who did not. The reality of the situation was that the desertion rate was so high that, as a general rule, the punishment could not be exceedingly harsh in practice and the ever-increasing fines and punishments associated with desertion reflect not the hardened resolve of the Commonwealth cracking down, but rather it's powerlessness in the face of a problem it cannot solve.
A good example of this can be found prior to the Battle of Chippewa in 1814. General Jacob Brown and Winfield Scott had recently been promoted and assigned to the US Army in Buffalo in upstate New York. Scott instituted tough and rigorous training and discipline, which was a change for how things had operated before. This spawned desertions, and six were caught after deserting. One of the six had his ears cropped and the letter "D" branded on his cheek. The other five were sentenced to death by firing squad, which was carried out. One of the five was very young, a teenager, and Scott had decided to spare him because of his youth. As a result, the soldiers in his firing squad had been issued blanks.
Source: The Battle of Chippewa by Matthew Seelinger, Chief Historian of the National Museum of the United States Army