AMCL publishes a PoseWithCovarianceStamped where the covariance represents the spread within the entire filter. This tells you something about how confident the filter is about its estimate, but not directly how good the estimate is. If you want to know how good a particular pose is, you'll have to apply the sensor model to the pose. AMCL does this in amcl_laser.cpp. If you want to modify AMCL, you can probably just call pf_get_cluster_stats
on the pose and look at the weight.
Edit:
pf_get_cluster_stats doesn't give variance on a particular pose, the weight is an estimate of how closely the pose matches the current laser scan based on the map, normalized (I think) by the weights of all the particles.
When you say "see how well the laser data correlates with obstacles in the cost map" this is exactly what is happening, except it's using the static map, not costmap.