how to define an issue with neural networks
It is good that you have created your own program. I would suggest you to keep experimenting with basic problems, such as MNIST by adding more hidden layers, plotting variation of loss with training iterations using different learning rates, etc.
In general, the learning rate should not be kept high initially when the network weights are random and it is a good practice to keep decreasing the learning rate over training period. Plotting the values of loss or error function w.r.t training iterations will give you good insight regarding this. If learning rate is very high, loss will fluctuate and vary too much. If learning rate is very small, loss will decrease very slowly with training iterations. If you are interested, read about this in Andrew Ng's course or some blog.
About your question regarding number of hidden layers and neurons, it better to start experimenting with lower number initially, such as 1 hidden layer and 30 neurons in your case. In your next experiment, you can have 2 hidden layers, however, keep track of number of learning parameters (weights and biases) compared to training samples you have because small training samples with large number of network parameters can overfit your network.
After experimenting with small problems, you can try same thing with some framework, let's say Tensorflow, after which you can attempt more challenging problems.
I have built a system where the neural network can change size (number of and size of hidden layers, etc). When training it with a learning rate of 0.5, 1 hidden layer of 4 neurons, 2 inputs and 1 output, it successfully learns the XOR and AND problem (binary inputs, etc). Works really well. 
When I then make the structure 784 inputs, 1 hidden layer of 30 neurons, and 10 outputs, and apply the MNIST digit set, where each input is a pixel value, I simply cannot get good results (no better than random!). My question is quite theory based: If my code does seem to work with the other problems, should I assume i need to keep experimenting different learning rates, hidden layers, etc for this one? Or should decide theres a more underlying problem? 
How do I find the right combo of layers, learning rate, etc? How would you go about this?
Testing is also difficult as it takes about 2 hours to get to a point where it should have learnt... (on a mac)
No, I am not using TensorFlow, or other libraries, because I am challenging myself. Either way, it does work ...to a point!
Many thanks. And apologies for the slightly abstract question - but I know its a problem many beginners have - so I hope it helps others too.