The UK government has given the green light for an £8bn offshore windfarm in the North Sea.