There are a plethora of military records available from the Revolutionary War on to our most recent conflicts. Check leading websites [Ancestry.com, FamilySearch.org, WorldVitalRecords.com and others] to see what military records are available. Fold3.com is dedicated to military records and is an excellent starting point. The site has a seven day free trial to help your preliminary search.
Rev War: Service records for Continental Line [regular army] soldiers. Pension files [soldiers, invalid, widows] for Line service. Bounty Land Warrants [land offered to veterans in lieu of pay, generally in Ohio for this war.] Your soldier may have done most of his service with a local militia unit, which did not qualify him for a pension. However, if his militia company was temporarily assigned to a Continental Line Regiment, then he qualified for a pension. Consult State Archives for lists of servicemen. Some of these are online. Maryland has a superb online website for its Revolutionary War records. Check local histories for names of soldiers. Valleyforgemusterroll.com has information on those soldiers who were at the Valley Forge encampment. Rev War pension files are available on microfilm at the Family History Library in Salt Lake and on Fold3. The Daughters of the American Revolution has a patriot search for veterans that have qualified their female ancestors for membership. Military service and civilian service qualified for the DAR. If an ancestor supplied food or clothing to the Army, served in Congress [US or Provincial] or otherwise leant aid and comfort to the Patriot cause, they qualified for the DAR. You can also search for you patriot on the Sons of the American Revolution site.
Civil War: Service records, enlistments, pension files are available. Some records are available online. Fold3 has pension cards that will give you the file number needed to order the files. The Civil War Soldiers and Sailors System is an excellent site for locating your CW veterans. The Grand Army of the Republic and Sons of Veterans of the Civil War organizations may also offer some help. State Archives offer information on soldiers. The Roll of Honor of the Army of the Republic [book series] is worth a look. For Confederate records consult Fold3 and other sites. Check with the Archives of those states that made up the CSA.
War of 1812: Pension files at FHL and Fold3. Check state resources for soldiers' records.
Pre-20th century military records are available at the National Archives in Washington DC. Post-20th century military records are stored in the NARA branch in St. Louis. Some records were destroyed by fire. Ancestry.com and other sites have draft and enlistment records.
If you need a Civil War service or pension file or file from other military service after 1783, I would recommend that you contact a professional genealogist in the DC or St. Louis area. NARA copy fees have sky-rocketed in recent years. If you have the file number and soldier's name [or widow's] a researcher can go to the repository and copy the file for you. Travel, copy fees, hourly rate and postage will still be cheaper than ordering from the NARA.