It may seem weird but interest rates are set by a market. Risk is a very large component of the price that a saver will accept to deposit their money in a bank but not the only one.
Essentially you are "lending" deposited cash to the bank that you put it in and they will lend it out at a certain risk to themselves and a certain risk to you. By diversifying who they lend to (corporations, home-buyers each other etc.) the banks mitigate a lot of the risk but lending to the bank is still a risky endeavour for the "saver" and the saver accepts a given interest rate for the amount of risk there is in having the money in that particular bank. The bank is also unable to diversify away all possible risk, but tries to do the best job it can.
If a bank is seen to take bigger risks and therefore be in greater risk of failing (having a run on deposits) it must have a requisitely higher interest rates on deposits compared to a lower risk bank. "Savers" therefore "shop around" for the best interest rate for a given level of risk which sets the viable interest rate for that bank; any higher and the bank would not make a profit on the money that it lends out and so would not be viable as a business, any lower and savers would not deposit their money as the risk would be too high for the reward. Hence competition (or lack of it) will set the rate as a trade off between risk and return.
Note that governments are also customers of the banking industry when they are issuing fixed income securities (bonds) and a good deal of the lending done by any bank is to various governments so the price that they borrow money at is a key determinant of what interest rate the bank can afford to give and are part of the competitive banking industry whether they want to be or not.
Since governments in most (westernised) countries provide insurance for deposits the basic level of (perceived) risk for all of the banks in any given country is about the same. That these banks lend to each other on an incredibly regular basis (look into the overnight or repo money market if you want to see exactly how much, the rates that these banks pay to and receive from each other are governed by interbank lending rates called Libor and Euribor and are even more complicated than this answer) simply compounds this effect because it makes all of the banks reliant on each other and therefore they help each other to stay liquid (to some extent).
Note that I haven't mentioned currency at all so far but this market in every country applies over a number of currencies. The way that this occurs is due to arbitrage; if I can put foreign money into a bank in a country at a rate that is higher than the rate in its native country after exchange costs and exchange rate risk I will convert all of my money to that currency and take the higher interest rate. For an ordinary individual's savings that is not really possible but remember that the large multinational banks can do exactly the same thing with billions of dollars of deposits and effectively get free money. This means that either the bank's interest rate will fall to a risk adjusted level or the exchange rate will move. Either of those moves will remove the potential for making money for nothing. In this case, therefore it is both the exchange rate risk (and costs) as well as the loan market in that country that set the interest rate in foreign currencies.
Demand for loans in the foreign currency is not a major mover for the same reason. Companies importing from foreign entities need cash in foreign currencies to pay their bills and so will borrow money in other currencies to fulfil these operations which could come from deposits in the foreign currency if they were available at a lower interest rate than a loan in local currency plus the costs of exchange but the banks will be unwilling to loan to them for less than the highest return that they can get so will push up interest rates to their risk level in the same way that they did in the market before currencies were taken into account.
Freedom of movement of foreign currencies, however, does move interest rates in foreign currencies as the banks want to be able to lend as much of currencies that are not freely deliverable as they can so will pay a premium for these currencies.
Other political moves such as the government wanting to borrow large amounts of foreign currency etc. will also move the interest rate given for foreign currencies not just because loaning to the government is less risky but also because they sometimes pay a premium (in interest) for being able to borrow foreign currency which may balance this out.
Speculation that a country may change its base interest rate will move short term rates, and can move long term rates if it is seen to be a part of a country's economic strategy.
The theory behind this is deep and involved but the tl;dr answer would be the standard "invisible hand" response when anything market or arbitrage related is involved.
references: I work in credit risk and got a colleague who is also a credit risk consultant and economist to look over it. Arbitrage theory and the repo markets are both fascinating so worth reading about!