The government decides. According to the law, it has to take place every five years. In reality, the interval is always much shorter. When a party has a very small (or no) majority in the House of Commons, the interval can be much shorter.