Best method of detecting peg in hole
We can't tell you the "best" method.  It depends on too many details we don't have.

Here are some options:


A reed switch at the bottom of the hole and a magnet on the peg.
A photo sensor at the back of the hole -- the peg blocks the light.
As you suggest, a switch at the side of hole.
Use contrasting colors on the wall and the pegs and detect the pegs using a camera and some sort of image processing (not an Arduino solution)


I think you are going to need to build some prototypes and experiment to find the best option for you.