This probably a more advanced answer than you're looking for, but one answer is the cohomology of a variety called a "hypertoric variety" constructed from the graph in a slightly subtle way. You can read more about this in papers by Hausel and Sturmfels Hausel and Sturmfels(Toric Hyperkahler Varieties) and Proudfoot and myself Proudfoot and myself(Intersection cohomology of hypertoric varieties). You should be warned that all those papers talk about hyperplane arrangments; you should turn a graph into a hyperplane arrangment by taking a variable for each vertex, and a hyperplane for each edge given by equating the variables at opposite ends.
One problem with this approach is that you can only see one variable at a time; T(x,1) is the Poincare polynomial of one variety (I think the graphical hypertoric variety) and T(1,y) is the Poincare polynomial for another (the cographical hypertoric variety).