Grace Murray Hopper (1906- 1992) wrote the first functional computer program. It was for the Mark I computer developed in 1944. She developed the first fully automatic calculator.
However, the first program written but never used was by the woman Ada Byron. It was written for Charles Babbage's 'analytical engine' which wasn't completed.