C E Bosworth's two books are still the best (the first edn of the first one is 46 years old now!). Out of print, but good libraries should be able to get them.
The Ghaznavids: Their empire in Afghanistan and Eastern Iran, 994-1040
Later Ghaznavids: Splendour and Decay, the Dynasty in Afghanistan and Northern India 1040-1186
Tom..