Why build nuclear reactors on shorelines?
In addition to the above it might be noticed that coal fired power stations are often inland despite their similar requirement for lots of water. The difference being in the weight of fuel required to run the power station.
A significant desirable fact of nuclear power is the very high energy density of the fuel compared to coal. So we have more flexibility in where it is economic to build, so the second factor of water supply becomes dominant and siting by a coast helps with this expense.
Also I guess that in the worst case scenario there is a ~50% chance any radioactive cloud will blow away from civilian populations.
As Deepak Vaid said above:
WATER especially with older BWR reactors having lots of water nearby proves to be very useful for keeping it running cool.
Also, access for shipping heavy components is easier. This is probably important for minimizing construction costs. Properly sited, a plant could still be near the shore, but be high enough up to be out of reach of any tsunami.