Yellow filters were a popular choice for black and white landscape photography. Like other contrast filters, they pass through the filter color but hold back complementary colours. In landscape photography, that means blue skies are made darker while yellow tones, including most foliage, keep their brightness. A yellow filter is one of the most popular black and white filters, along with the red filter.
It is possible to replicate the effect of a yellow filter in photo editing software when starting from a color image and using channel mixing tools or similar controls. You get a lot more control and can create a much stronger effect than old school yellow filters, but the downside is that you can also get more noise and digital artefacts because of the way colors are captured with a digital sensor.