There are several possibilities, the shocks may be bad, but I would check the rear sway bar links first. Make sure the bolts are tight per the technical bulletins (below) and see this pic to know where the links are located: http://bit.ly/accord_rear_suspension They are #6 and #7 in the picture.
Service Bulletin 97-069 Applies To: 1998 Accord LX and EX Models – L4 thru VIN 1HGCG5...WA021768 October 27, 1997 Rattle From Rear Stabilizer Bar SYMPTOM Rattle from the rear suspension. PROBABLE CAUSE Loose nuts on the rear stabilizer bar cause a rattle from the rear suspension. CORRECTIVE ACTION Retorque the nuts on the rear stabilizer bar to the proper specification.