By how and why, I mean, what factors pushed them to develop echolocation and how did the intermediate stage (before a full-fledged echolocation system was developed) look like?
There are many conditions in which echolocation has evolved, and bats, dolphins, and even some birds (oilbirds) have evolved the ability to echolocate with different anatomical structures. Echolocation is a great example of convergent evolution, where a very similar feature is developed through very different stages in different taxa. Stephen Rossiter (from Queen Mary University of London) has uncovered that both bats and dolphins have similar mutations in a unique protein called "prestin", that increases hearing sensitivity. This could be a key step in developing the ability to echolocate.
Before a fully fledged echolocation system developed, fossil odontocetes seem to have developed high frequency hearing and sound production structures (for more details see research by Travis Park, Erich M. G. Fitzgerald, Alistair R. Evans http://rsbl.royalsocietypublishing.org/content/12/4/20160060 DOI: 10.1098/rsbl.2016.0060).
Instead of anatomical limitations (eyes on the side of the head) driving the development of echolocation, it seems to have evolved because it gives predators a competitive edge over visually oriented predators.
Simple echolocation is fairly widespread and varying levels of quality exist
This specifically addresses what the intermediary forms look like.
Mammals posses some nice preadaptations for echolocation. external ears for gathering sound, a three bone middle ear which creates an amplifier which means mammals can hear both weaker and a wider range of sounds. It also means the brain has to be able to do more processing of sound due to distortion and frequency shift. Even humans can perform very limited echolocation with training due to this.
Old world fruit bats don't use full fledgedly echolocation like other bats and dolphins. First the sound is created by their wings not their vocal cords, it is a side effect of their wing beat. Second it is functionally rather poor not giving a very detailed image, as noted in this study they cannot detect small objects or judge distance very accurately unlike other bats. The study also have a lovely table showing how many other animals have primitive forms of echolocation, including shrews, rats, and swiftlets.