If $F$ is finite, $p$ and $q$ are irreducible, and have the same dagree $d$, then $F[x]/I$ and $F[x]/J$ are isomorphic $F$-algebras, since there is (up to isomorphism) only one extension field of a finite field of any given degree (see for example Birkhoff & Mac Lane, A survey of Modern Algebra, Section 15.6).

Things get a little more interesting when $p$ and $q$ are not irreducible. Suppose that $p=p_1^{n_1}p_2^{n_2}\ldots$. Then $F[x]/I$ is isomorphic to $\bigoplus_i F[x]/(p_i^{n_i})$. It turns out that, for any perfect field $F$, if $E_i=F[x]/(p_i)$, then $F[x]/(p_i^{n_i})$ is isomorphic to $E_i[t]/(t^{n_i})$ (this result is well-known, if not well-documented; a proof appears here (see Theorem A.19)). Thus for finite fields the general answer to you question is the following:

## For finite fields

$F[x]/I$ and $F[x]/J$ are isomorphic if and only if the numerical invariants of the polynomials $p$ and $q$ are the same, in other words, if $p=p_1^{n_1}p_2^{n_2}\ldots p_r^{n_r}$ and $q=q_1^{m_1}q_2^{m_2}\ldots q_s^{m_s}$ are the decompositions of $p$ and $q$ into irreducible factors, then there is a bijection $w:\{1,\ldots,r\}\to \{1,\ldots,s\}$ such that the degree of $q_{w(i)}$ is the same as the degree of $p_i$ and $m_{w(i)}=n_i$ for all $i\in \{1,\ldots,r\}$.

For general perfect fields, this does not give a complete solution. What we get is

## For perfect fields

$F[x]/I$ and $F[x]/J$ are isomorphic if and only if when$p=p_1^{n_1}p_2^{n_2}\ldots p_r^{n_r}$ and $q=q_1^{m_1}q_2^{m_2}\ldots q_s^{m_s}$ are the decompositions of $p$ and $q$ into irreducible factors, then there is a bijection $w:\{1,\ldots,r\}\to \{1,\ldots,s\}$ such that $F[x]/(q_{w(i)})$ is isomorphic to $F[x]/(p_i)$ and $m_{w(i)}=n_i$ for each $i\in \{1,\ldots,r\}$.

Thus the problem is reduced to determining whether or not two irreducible polynomials give rise to isomorphic field extensions.

Edit: Ricky Demer pointed out that the "only if" parts of the above assertions are not obvious, and so here is a way out: We can recover the subalgebras $F[x]/(p_i^{m_i})$ from $F[x]/I$ as the indecomposable ideals.
It remains to show that if $p_i$ is irreducible then the field $E_i=F[x]/p_i$ and the integer $m_i$ can be recovered from $F[x]/(p_i^m)$. This is not hard:

The field $F[x]/p_i$ can be recovered from $F[x]/(p_i^n)$ as the quotient of the algebra by its radical.

The integer $m_i$ can be recovered as the length of the ring $F[x]/p_i^{m_i}$.