We construct an obstruction theory for relative Hilbert schemes in the sense of Behrend-Fantechi and compute it explicitly for relative Hilbert schemes of divisors on smooth projective varieties. In the special case of curves on a surface V, our obstruction theory determines a virtual fundamental class $[[ Hilb^m_V ]]$, which we use to define Poincare invariants (P^+_V,P^-_V): H^2(V,Z) --> Lambda^* H^1(V,Z) x Lambda^* H^1(V,Z). These maps are invariant under deformations, satisfy a blow-up formula, and a wall crossing formula for surfaces with $p_g(V)=0$. We determine the invariants completely for ruled surfaces, and rederive from this classical results of Nagata and Lange. The invariant $(P^+_V,P^-_V)$ of an elliptic fibration is computed in terms of its multiple fibers. We conjecture that our Poincare invariants coincide with the full Seiberg-Witten invariants of Okonek-Teleman computed with respect to the canonical orientation data. The main evidence for this conjecture is based on the existence of an Kobayashi-Hitchin isomorphism which identifies the moduli spaces of monopoles with the corresponding Hilbert schemes. We expect that this isomorphism identifies also the corresponding virtual fundamental classes. This more conceptual conjecture is true in the smooth case.