How was CES utility function derived? Is there any book/papers that I can refer to the proof (derivation) of the CES utility function?
Or if anyone could help me with the derivation, I will be so much grateful to you.
To understand the CES utility functions, which I guess is your question, a good starting point is the Wikipedia page on constant elasticity of substitution. In particular,

The CES aggregator is also sometimes called the Armington aggregator, which was discussed by Armington (1969).

Then, the CES utility function was popularized by Dixit and Stiglitz (1977) in their study of optimal product diversity in a context of monopolistic competition.
If you want to understand how the CES utility function behaves when $\sigma=\infty$ or $\sigma=1$ here is a nice discussion of the basics of the CES utility function, which is widely used in trade.
If you want a deeper understanding of the elasticity of substitution and a discussion of the special class for which the elasticity of substitution is a constant $\sigma$, here is an insightful discussion by Ted Bergstrom.