how could bad harvest season make the Central bank to increase in key rate?
At the beginning of 1800s Britain still roughly $36\%$ of a employment and $33\%$ of British GDP was generated by agriculture (see Grigg 1992). Hence shock to agricultural output could easily lead to recession and have widespread economic effect.
Given what large role agriculture played in the Britain's economy I do not think it is surprising that central bank decided to act in some way. Hiking interest rate in such situation might seem strange with hindsight and living in current fractional reserve system, but that was part of what Keynes called the 'rules of the game'. As explained by the oxford reference:
Under the ‘rules of the game’, countries losing gold were supposed to raise their interest rates and cut their money supply; countries gaining gold were supposed to cut interest rates and increase their money supply. These rules were intended to restore equilibrium in the balance of payments fairly quickly.
Fall in output (in this case agricultural output) would cause gold outflow because suddenly UK would loose production that was meant to be exported which would worsen its balance of trade. Moreover, under gold standard imports create gold outflow and exports gold inflow. So to play according to the 'rules of the game' the central bank had to hike interest rate.
Of course, doing this in our present fractional reserve system would make no sense and hence it feels very counterintuitive. However, under gold standard central bank cannot just let all gold flow out of country as that would lead to balance of payment imbalances as with gold standard all countries are implicitly under the same fixed exchange rate regime. This was also one of the reasons why eventually gold standard broke down and generally it is not very stable and resilient monetary regime (Eichengreen & Temin, 2010).
Also, how the increase in the key rate could could have made a contribution to the declining prices?
Higher interest rate leads to decrease in prices because it incentivizes people to spend less and save more putting less pressure on prices.