A Doncaster MP has welcomed funding from Great British Energy to fund solar power for a school in his consituency.