On my phone and not a native English speaker so I'm sorry for the chaos:
By the end of the 19th century cycling was really popular. It was common in England and Germany for employers (state and private) to sell there workforce very cheap 'velocipede' or bicycle. And for good reason, (cheap) bicycles increase the quality of life in ways we don't imagine anymore today. This was a cheap way of transport fueled by calories, before this you either needed a horse (expensive) or train (inflexible in direction and cost money). This allowed a person to live further away from there job where before you basically were confined to a overcrowded area of town. In 1897 the government of the German Empire officially announced that the ownership of a bicycle increases the prosperity of the workers.
In the Netherlands the bike got imported from England and France from 1870 and between 1890-1894 it became affordable and wasn't confined to the rich anymore. In 1891 there were probably around 10.000 bicycles but more precise numbers are available since 1899 due to a bicycle tax. In that year the amount of bicycles were 1 for every 53 citizens (100.000), 1 for every 17 by 1906 and in 1912 this was 1 bicycle for every 10 citizens. As mentioned earlier this was due to price, in 1880 they cost 250 guilders which was a half year worth of salary for an average worker as they earned 19 cents per hour. By 1889 the cheapest Dutch model was 90 guilders (and interestingly models imported from England were 60 guilders!). Around 1900 a worker expected to earn around 10 guilders a week making it affordable. In 1930 the yearly salary was 2100 guilders and a bicycle costed around 35-50 guilders, everyone could afford one.
In 1928 the Netherlands ranked 1 in bicycles per citizens:
Netherlands - 1 per 3.25 citizens Denmark - 1 per 4.75 citizens Germany - 1 per 5.8 citizens France - 1 per 6 citizens England - 1 per 7.1 citizens United States - 1 per 70 citizens.
The Royal family was known to cycle as well, in 1897 Queen Wilhelmina bought a bicycle after visiting Vienna and seeing a cyclist competition. Later the Prime-Minister forbade her to continue her cycling, this only stopped for a moment and she continued doing so anyway eventually...
http://www.fietsen.123.nl/images/2010-02/02wilhelminafiets.jpg
Like here in Den Haag (The Hague), yes that is Queen.
Queen Juliana was known in the world as the "biking queen" she was known to arrange bicycle tours whenever she visited a place.
From 1953 at Palace Soestdijk
http://www.fietsen.123.nl/images/2010-02/04koninginjulianafiets.jpg
During a visit of Friesland (Frisia) in 1967
http://www.fietsen.123.nl/images/2010-02/06julianaopfiets.jpg
And telling the mayor of Helomavaart to cycle faster in 1974. (she is the second one)
http://www.fietsen.123.nl/images/2010-02/07julianafriesland.jpg
Not as much as her mother but Queen Beatrix (then still princess) along with Prince Claus also cycled, a tradition seems to have been established.
http://www.fietsen.123.nl/images/2010-02/10clausenbeatrixopfiets.jpg
And the current King and Queen
http://www.fietsen.123.nl/images/2010-02/14willemalexandermaximafiets.jpg
This laid a solid foundation for a positive outlook to cyclists which helped later.
Automobiles started to become more popular which caused a decline as expected. In 1939 there are 3.7 million bicycles and a 100.000 cars, the amount of cars increased sixfold between 1916 and 1938. The increase of car accident which involved cyclists in 1/3 of the accidents got the bicycle labeled as unsafe. Cyclists were often seen as unpredictable and undisciplined participants in traffic.
Then World War II happened, we have an expression here in the Netherlands that we want our bike back whenever we speak about Germany. This is not unfounded the Germans confiscated the bicycles for materials. In 1940 there was 1 bicycle per 2 citizens and this decreased by 55% in 1942 when they started confiscating. Interesting raport from a German soldier:
"The Dutch who is almost born on a bicycle sees the confescation of his bicycle as the worst thing that has ever happened to him. No German introduced law has embittered the entire society as this one" After 1942 the rate of confescation dropped to local efforts, and steadily declined in rate but when the war was over many people were without bikes, this was alleviated in 1946 when some returned from Germany.
A few years after WWII half of all commuters used a bicycle again, due to the economic situation cars weren't on the rise proportionally to bicycles.. However this changed in the 50's and cars started to take off. As the amount of cars on the road grew so did the amount of accidents.
By 1971 3000 cyclists died per year of which 450 were childeren. After the child of a journalist called Vic Langenhoff died in 1971 he wrote an article called "Stop the child murder". A movement was made named after the articles and they started protesting for change. But what really reversed the decline in cycling from the 50's and 60's was the OPEC oil boycot of 1973 on top of this movement. This led to a massive infrastructure project that made smooth cycling lanes next to roads, tunnels were being made safer by proper lighting and no corners (but a sloping wall at the front and end) so nobody could jump you by surprise which increased the sense of safety. Today the average dutch person cycles 2.7 km a day (anecdote: my 86 year old grandmother still cycles).
TL;DR: Early mass adaption by every class including the Royal Family, and a focused effort after the 1973 OPEC oil crisis and a 1971 news article on the amount of kids that died in accidents led to major improvements in bicycle infrastructure.
Sources:
100 years of cycling in the Netherlands 1850-1950 from the University of Warsaw (dutch translation): http://fietspadenstichting.nl/honderd%20jaar%20fietscultuur.pdf
BBC article on cycling in the Netherlands for a more readable source: http://www.bbc.co.uk/news/magazine-23587916
In addition to /u/Spiona's excellent answer, also see in this video How The Dutch Got Their Cycle Paths