You've phrased the question in an odd way, as though London were pre-designated as England's capital and the current location was specifically chosen.
But in any case, London is built on the river Thames, and this gives it access to the sea, directly. Well into the last century it was the busiest port in the world.
You want a port to have some shelter from the sea and its weather, whether in an inlet or an estuary or on a good stretch of wide, deep river. I'd say it effectively is on the coast, in that it's at the head of (or just upriver from) an estuary. Many nearby ports are similarly situated - Rouen (Seine), Bordeaux (Gironde), Antwerp (Scheldt), Hamburg (Elbe) - such locations offering protection against the North Sea or Atlantic. In England there are also Bristol (Severn/Avon), Southampton (Itchen), Hull (Humber) and later Liverpool (Mersey). In London's case it's also at the lowest point bridgeable at its foundation, thereby offering good links in all directions without being too peripheral. All in all, it's an excellent location if your trading partners are mostly east and south. I'm more puzzled that Southampton didn't grow faster after its early lead.
To expand / modulate /u/LaserPoweredDeviltry's reply:
Animal-drawn carts, pack animals, and pack people are hideously more inefficient (cost for weight / distance) and usually slower than water travel. I tried to find a source, and I found "In Roman times the expense of hauling grain 100 miles had equaled the value of the grain; in the thirteenth century the transport charge for 100 miles fell to only 30 of the price of the grain", due to transitioning from oxcarts to horse-drawn carts (Archer Jones,The Art of War in the Western World; Univ. of Illinois Press matches what I've seen elsewhere). That's especially true for bulk goods, like grain and fodder, that cause a problem with volume. Yet even Romans had no particular difficulty sailing grain from North Africa to Rome, even from as far away as Egypt.
Rivers can be narrow and shallow, but more than that, they can have waterfalls. But tides are stopped by waterfalls (or by distance or volume, but often enough waterfalls are the limit), so ceteris paribus you can sail up to the limit of tides. At the first waterfall, unless a canal or lock has been made, you have to stop and unload for land transportation. So there's an incentive for a port there.
The Fall Line and major cities of the Eastern U.S. is a lovely illustration from Dr. Bruce Railsback's course GEOL 1122 - Earth's History of Global Change - at the University of Georgia. The fall line ("the boundary between the hilly Piedmont and the flat Coastal Plain") is eyeballed, and it lines up with 7 major US East Coast cities. (New York City hurts his thesis. He seems to be saying that the fall line is at the coast, I guess at the Palisades?, but the Hudson is navigable for more than 130 miles, but nevertheless New York City is on the coast and Albany is at the head of navigation.) He adduces 6 more in the South.
So what I'm wondering is why London, UK, isn't farther up, near Teddington Lock, the current head of the Thames Tideway, some 10 miles SW of Charing Cross.
EDIT: and similarly why New York City is the big port and not Albany, and why New Orleans was the biggest city in the South even after they cleared the tree snags out of the Mississippi. Are the harbors at New York City and the Pool of London enough deeper and wider to overcome the positional infelicity? Once they were large, then the "updraft" effect might have kicked in (there's money, equipment, and facilities to make it easier to expand, so people expanded, increasing the money, equipment, and facilities).