When atoms or molecules are brought together to form a lattice, outermost orbit electrons gain discrete energy levels and when these energies are classified they group into valence band and conduction band. I have read in a text book that, the energies are classified into multiple energy levels. Is it true and if it is, on what basis are the energy bands identified as conduction or valence band?
Keep in mind that this is just a model. However, you can think of electrons as particles around nucleons. Electrons build up layers. They like to be on the lowest possible energy layer (everything in nature is lazy!). However, they cannot occupy a seat that is already taken. So if the more comfortable seats on the lower ladder are already taken, they have to climb the ladder and take a seat on higher levels. The ladders can become quite long and reach into the neighbor's backyard. There could be already another ladder with electrons sitting on it. It may happen, that there are enough electrons on overlapping ladders. They can easily change between the gardens (between the different nucleons) and can carry around stuff, like electricity. If the ladder-steps are all filled they cannot do this. But if there are free steps on each ladder, the electron can travel around, the village becomes conducting and electricity can flow. The outermost steps that are completely filled an therefor not conducting are called valence bands, because with enough energy you can force an electron to leave its comfortable place and run around, i.e. to conduct as well.
So, the bands are just a model. You can create your own model with other bands, if it is helpful in any way. But it is the case that the outermost electrons are the easiest to convince to go somewhere else, therefore only the two outermost layers (bands / ladder-steps) are of interest in condensed matter physics (usually).