Lets assume the group is size $6$ or larger. If the Cayley table is symmetric with respect to the diagonal or has an odd number of elements, then it is not a dihedral group. If the table passed, then it is a $2n$ by $2n$ asymmetric grid. Now assuming our table has passed we can search for an element of order $n$ by repeated self multiplication of each element. If this order $n$ element doesn't exist, then the group is not dihedral. If the table has passed then we must have some element $\rho$ of order $n$, and we can list out all powers of $\rho$. Now search for an element of order 2 which is not in the list of powers of $\rho$. If this doesn't exist then we don't have a dihedral group. If it does, call it $\tau$. Now multiply these generators to get $\tau \rho$ and square the result to get $( \tau\rho)^2$. If that is the identity element then you must have a dihedral group, otherwise you have something else.
This process is maybe not too efficient but it works.