Overwatering is by far the most common cause of yellow leaves on your fern. The asparagus fern is thirstier than many other plants, so it can be easy to accidentally overcompensate and give it more than it needs if you’re not checking the soil. You should only water after 50% of the soil volume is dry. If the soil is constantly wet, over time this can lead to root rot, where your roots turn dark and mushy.
If you suspect overwatering is an issue, it helps to remove the entire root ball and assess the roots; white roots are healthy, black or brown mushy roots are not. If you’ve discovered rot, cut away the damaged roots with a pair of sharp clean shears, and repot your plant. You also need to make sure your pot has a drainage hole, and allow all excess water to drain out every time you water.
Asparagus fern enjoys a humid environment! If your air is too dry this could also be a cause of yellow leaves. This plant enjoys daily misting, and the use of a pebble tray or humidifier can help keep the plant green and healthy.
Yellow leaves can actually be a sign of either too much or too little light. Your fern grows best in bright indirect sunlight. Avoid direct bright light or too low of light. An east-facing window is ideal.
If you’ve ruled out all of the above, one other possibility is that the soil is depleted of nutrients. In the spring and summer, give your fern a monthly dose of all-purpose plant food diluted to half strength.