There are many books relating to wars. Some of these contain more detail than others.
For service personnel in the early 1800s and 1700s it is always well worth looking at Almanacs, (even the Irish Almanacs have records of British Army and Navy personnel) especially if you are looking for people with ranks.
National Roll of the Great War
National Roll of the Great War, a series of books published in 1921 which list not only servicemen and details of their records, but also civilians who gave their services, such as nurses, etc.
Magazines and newspapers published at the time, especially of the Boer War and World War I can be fascinating, and often give graphic detail and photographs of the campaigns and battles in which your ancestors were involved.
Much has also been written in great detail about earlier wars, such at the civil war, the Napoleonic wars, etc. Not modern books, but old books written during or just after the events. Fascinating stuff, and many with anecdotal stories of ordinary people.
See the Miltary Books at Parish Chest