You asked

Is the pentax hd d fa 24 70mm f 2 8 ed sdm wr good for astrophotography?

The site doesn't cover astrophotography, so it can't say whether this lens is good for it. It can still show what the lens offers for dim-light work.

The Pentax HD D FA 24-70mm f/2.8 ED SDM WR has a constant f/2.8 aperture, and that is its main strength in the dark. The aperture guide explains that a wide opening gives faster shutter speeds in dim light, and that a constant-aperture zoom keeps the same exposure across its whole range. It is made for full-frame sensors, so pair it with a full-frame body such as the Pentax K-1. On a full-frame body, the 24mm end gives a reasonably wide view of the sky.

The lens has drawbacks for this kind of shooting. It isn't stabilised. Stabilisation steadies the camera, not the subject, so it helps most with handheld shots. A tripod already keeps the camera still, so the lack of stabilisation matters less on a tripod, but it does mean you'll want to be on a tripod. The lens is also a standard zoom rather than a wide one. If you want a wider field for the Milky Way, the site lists the Pentax HD D FA 15-30mm f/2.8 ED SDM WR, also full frame and also f/2.8. The landscape page describes wide zooms for big skies and foregrounds, though it doesn't cover night sky work.

Written by Claude from this site's pages.

From these pages

This answer is for the question above. Each answer is written for the exact question in its address, so a question with its details in it (a budget, what you shoot, what you already have) gets an answer about those details. An answer draws on all 15 pages of the guide and its catalogue of 320 cameras and 1050 lenses. Another question gets its own answer at its own address, as words after /ask/. Or fill in your own: /ask/which-camera-for-{what-you-shoot}-under-{budget}-euros or /ask/which-lens-for-{what-you-shoot}-on-{your-camera}.