Binary-state dynamics (such as the susceptible-infected-susceptible (SIS) model of disease spread, or Glauber spin dynamics) on random networks are accurately approximated using master equations. Standard mean-field and pairwise theories are shown to result from seeking approximate solutions of the master equations. Applications to the calculation of SIS epidemic thresholds and critical points of nonequilibrium spin models are also demonstrated.