The essential difference between dense and sparse linear systems is that dense systems express relationships in which each unknown depends on all (or many) of the other unknowns, while sparse systems express relationships in which each unknown depends on a small fixed number of other unknowns (often these are its "neighbors").
In the numerical discretization of PDEs by the method of lines, dense matrices occur whenever the basis functions of the spatial discretization have support over the whole problem domain (the support of a function is the region over which it takes non-zero values). The most common example is that of pseudospectral methods, as mentioned by Pedro. In that case, the basis functions are typically Fourier modes or Chebyshev polynomials.
As mentioned in the question, typical finite difference and finite element discretizations lead to sparse matrices, because they use basis functions with support equal to a few times the mesh spacing. However, there are finite difference and finite element discretizations that lead to dense matrices:
- spectral collocation methods can naturally be viewed as finite difference methods where the finite difference stencil extends over the whole grid
- Spectral Galerkin methods can naturally be viewed as finite element methods where the basis functions extend over the whole grid.