Before WWII, flying boats were a popular form of transport, and the advantages are many: No need to build runways, capability of emergency landing on water, availability of large landing sites and no tire wear and tear. Why have they been abandoned?
The biggest single reason for the decline of flying boats was the proliferation of long runways during World War II. The infrastructure advantage of flying boats – the ability to operate heavy aircraft without long runways – was no longer relevant. Large airfields were a result of the long-range heavy bomber campaigns in Europe and Asia.
Century of Flight has an interesting article that goes a bit more in depth.
Apart logistics and the availability of long runways afterr WWII, the reason for the phasing out of the sea planes was maintenance. The aircraft was operating in an extremely corrosive environment, something that can be seen nowadays in the firefighting planes like the Canadair and other smaller seaplanes. More info: FAA Corrosion Control.
Also the engines need to be inspected and cleaned after every operation. Generally speaking, operation in corrosive environments like water is something that requires very careful inspection and time consuming maintenance. For example even the Chinook helicopter needs extensive cleaning after operations that involve landing on water.
Finally the increased drag due to the shape of the flying boat is something that every designer and airliner wants to avoid.
Flying boats were a solution for long over water flights when engines were less reliable and could not produce sufficient power to lift large loads.
Regular flying boat services between New Zealand and Australia which I am most familiar with, often never flew above 5,000ft. This meant they subjected passengers to considerable discomfort at the mercy of bad weather.
In areas where there were primitive support facilities and no runways, especially in the Pacific, these flying boats continued to operate into the early 'sixties, but as more and more runways were built the need for flying boats diminished and the cost increased.
Tahiti and New Zealand operated the last scheduled routes for large flying boats in the Pacific.
Shin Meiwa in Japan did propose a civil version of their impressive STOL US-1 which would have carried >50 passengers in a pressurised cabin. India is interested in such aircraft for search and rescue but no orders have arisen for the civilian aircraft.
Beriev in Russia has also developed an equally impressive Be-200 jet powered flying boat (smaller sibling of the A-40 Albatross). The Be-200 is offered as an amphibious airliner configuration, but so far airlines have not shown any interest.