Switching between battery voltage and solar voltage to control load. in solar charger?
Basically I need to design the circuit which automatically switch
  between solar voltage and battery voltage depending upon the
  conditions of the day and night.


Why not consider one of Linear technology's Power Path Prioritizers like the LTC4419: -



The chip is good for up to 18V so no worries there. Imagine your solar panel were connected to where it shows the 5V wall adapter connection. It changes over from one supply to the other fairly quickly: -



There is also the LTC4416 PowerPath Controller: -