Finding soldiers after 1811
If your male ancestor married between 1811 and 1932, the marriage supplements should have a declaration that he fulfilled his military duties. This declaration should show if the ancestor served or got an exemption. If you are lucky, the declaration will name the regiment.
Another way to find out if your ancestor served is by consulting the militieregisters [militia registers], which recorded all men that were called up in a municipality in a given year. Some of these militieregisters are available online.
Once you know the regiment, you can consult the military records at the National Archives. These records will be digitized in the near future. Some of the earlier records are available at FamilySearch. The National Archives has several indexes of soldiers in the army [landmacht], navy [marine], and the Royal Dutch East Indies [KNIL, OostIndië].
Finding soldiers before 1811
In earlier centuries, there are no national records that record all soldiers. Marriage records will often tell you if the groom served in the army, and give the regiment or officer they were serving under. The National Archives has an index of soldiers serving in the army between 1707 and 1795.