The need for dental x-rays is determined by what treatment needs to be done and how long it has been since the last x-rays were taken. If you are only having a filling an x-ray may not be necessary if the cavity is plainly visible. However, if the extent of the decay is not plainly visible and/or you require additional treatment an x-ray may be necessary. If you are having a check up the need for x-rays is determined by several factors which the dentist will need to take into account at the time (e.g. time since last x-rays, number and size of existing fillings, ease of access between teeth to check for cavities, caries history of the patient, etc.). If you are having a tooth extracted it is almost certain that you will require an x-ray.