Designs of the submarine go back to antiquity, but the first actual useful submarines were not used until the 19th century. The first time a submarine was ever used in combat was in the American Revolution but it failed. It was used again in the War of 1812 but it failed again and the pilot died. In the mid-19th century they were propelled by occupants either by oars or a hand crank, because of this and poor air circulation, the crew were exhausted after using it. In the American Civil War both sides used submarines to deliver mines. They had a small effect on the war effort in the long run. It wasn't until World War I that their impact was significant.
At the beginning of the World War I, submarines were considered nuisances and still not taken seriously. They had a lot of limitations. Being stationed on sub was a miserable experience. They did not have a lot of room. They had a crew of 30 or so and had no room for food. They had to scavenge on islands or get fish by intimidating fishermen. If they ate submerged, the ship smelled of fish. This compounded the usual stench of diesel and body order. The hot engine and the warm bodies contrasted with the cold water on the exterior making for a humid environment, roughly 100 degrees F, much like a tropical jungle. All clothing was wet. They couldn't bathe and had one bathroom which could only be flushed when it was above water or in shallow water. Morale was low due to poor living conditions.
They also had limited tactical advantages. Early submarines were at its most vulnerable when they were submerging.
They were defenseless to being rammed by a warship or being fired upon.
Buoyancy was highly dependent on temperature and salinity. It was
easier and quicker to descend in the Baltic Sea than it was in the North
Sea because of this. Sudden shifts in salinity was dangerous so when a submarine went by a river delta, it would suddenly rise. Sudden shifts
in temperature and salinity could make you rise above water and appear in
front an enemy destroyer. Also, they weren't sure what they were firing on when they did so. What they could see from a periscope was limited. They had no communication with the outside world because they were often very far from the rest of the fleet. When they were in radio range, they had to be above water to transmit on the wireless. The captain of the sub was on his own with many of the decisions on whether to fire or not. The subs were packed so tight that when a torpedo was fired, the men would have to shift positions to redistribute the weight that was lost. Torpedoes had a 60% chance of failure and when they did fail, the crew could not tell why it failed.
It wasn't until the sinking of the Lusitania that the submarine was thought be of great use. Before the Lusitania sank, it was thought be impossible for a sub to sink a huge ocean liner. The U20 German Sub sank it with one torpedo that caused a second explosion that brought it down. No one knows for sure what caused the second explosion. Some think it was carrying a cache of explosives, but there is no proof of this. It was carrying a supply of American made rifles to be delivered to the German's enemy Great Britain but that was the only armaments on board. The explosion was much too small to be a cache of explosives. Another theory was that the first explosion knocked loose coal dust which were ignited. The most official explanation was that a "thermal shock" occurred which is what the Lusitania's captain, William Thomas Turner, opined. This a steam explosion probably caused by the cold sea water entering the boiler room. Regardless, with the land war losing popularity among German citizenry, the new submarine war became very popular.
Of the 1,962 people on the Lusitania, only 764 survived. With the exception of two soldiers on leave, they were all civilians, 128 were Americans. The sinking of ocean liners by German u-boats continued, but this was the first big one and it changed public opinion of the war in the states. I always thought that the President Wilson immediately declared war on Germany after it sank, but it took two more years for the US to declare war. The Lusitania being compared to Pearl Harbor is not a good analogy. By 1917, ships leaving British ports had one in four chance of getting sunk. Who knows how many lives would have been saved if the US had gotten involved earlier.
Most of this information was found in the excellent book: Dead Wake: The Last Crossing of the Lusitania by Erik Larson.