Artificial intelligence is a technology for simulating and extending human intelligence and has rapidly altered many aspects of modern society. Optical processors, which compute with photons instead of electrons, can fundamentally accelerate the development of artificial intelligence by offering substantially improved computing performance. Photonic approaches for demonstrating artificial neural networks as one of the most widely used frameworks in artificial intelligence, show extraordinary potential to achieve brain-inspired information processing at the speed of light. Recently, all-optical diffractive deep neural networks have been created that are based on passive structures and can perform complicated functions designed by computer-based neural networks. However, existing passive diffractive deep neural networks are not reconfigurable and once is fabricated, its function is fixed. This work reports an on-chip programmable deep diffractive neural network (OPD2NN), in which the optical neurons are built with Sb2Se3 phase change material, making the network reconfigurable and non-volatile. Using numerical simulations, the performance of the OPD2NN is benchmarked on two machine learning tasks that are learning a multifunctional (AND-OR-NOT) logic gate and classification of images of handwritten digits from the MNIST dataset and the obtained results are validated using FDTD simulations by a commercially available full-wave electromagnetic solver. Both numerical and FDTD simulations indicate that a five-hidden-layer OPD2NN with a footprint of 30μmx150μm can appropriately handle (AND-OR-NOT) logic functions. For handwritten digits (0-1-2-3) classification, a three-hidden-layer OPD2NN with a footprint of 60μmx105μm can achieve numerical testing accuracy of 91.5% on the test dataset and the FDTD verification results show 73% matching with numerical testing results.